Documentation ¶
Index ¶
- Variables
- func AddressProtocolToSignType(protocol address.Protocol) crypto.SigType
- func Equal(t *testing.T, expect, actual interface{})
- func GenBlockHead(miner address.Address, height abi.ChainEpoch, parents []cid.Cid) (*shared.BlockHeader, error)
- func GenTipset(height abi.ChainEpoch, width int, parents []cid.Cid) (*shared.TipSet, error)
- func IsSortedByNonce(t *testing.T, msgs []*messager.Message)
- func MockReplaceMessageParams() []*types.ReplacMessageParams
- func MockSendSpecs() []*types.SendSpec
- func MsgGroupByAddress(msgs []*messager.Message) map[address.Address][]*messager.Message
- func NewMessage() *types.Message
- func NewMessages(count int) []*types.Message
- func NewShareSignedMessage() *shared.SignedMessage
- func NewShareSignedMessages(count int) []*shared.SignedMessage
- func NewSignedMessages(count int) []*types.Message
- func NewUnsignedMessage() shared.Message
- func RandAddresses(t *testing.T, count int) []address.Address
- func RandNode() *types.Node
- func RandNodes(count int) []*types.Node
- func ResolveAddr(t *testing.T, addr address.Address) address.Address
- func ResolveAddrs(t *testing.T, addrs []address.Address) []address.Address
- func ResolveIDAddr(addr address.Address) (address.Address, error)
- func SliceToMap(in interface{}) map[string]interface{}
- type AuthClient
- type FullNodeServer
- type MockFullNode
- func (f *MockFullNode) AddActors(addrs []address.Address) error
- func (f *MockFullNode) ChainGetMessagesInTipset(_ context.Context, key types.TipSetKey) ([]types.MessageCID, error)
- func (f *MockFullNode) ChainGetParentMessages(_ context.Context, bcid cid.Cid) ([]types.MessageCID, error)
- func (f *MockFullNode) ChainGetParentReceipts(_ context.Context, bcid cid.Cid) ([]*types.MessageReceipt, error)
- func (f *MockFullNode) ChainGetTipSet(_ context.Context, key types.TipSetKey) (*types.TipSet, error)
- func (f *MockFullNode) ChainHead(_ context.Context) (*types.TipSet, error)
- func (f *MockFullNode) ChainList(ctx context.Context, tsKey types.TipSetKey, count int) ([]types.TipSetKey, error)
- func (f *MockFullNode) ChainNotify(ctx context.Context) (<-chan []*types.HeadChange, error)
- func (f *MockFullNode) GasBatchEstimateMessageGas(ctx context.Context, estimateMessages []*types.EstimateMessage, ...) ([]*types.EstimateResult, error)
- func (f *MockFullNode) GasEstimateMessageGas(_ context.Context, msg *types.Message, spec *types.MessageSendSpec, ...) (*types.Message, error)
- func (f *MockFullNode) MpoolBatchPushUntrusted(_ context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error)
- func (f *MockFullNode) MpoolGetConfig(_ context.Context) (*types.MpoolConfig, error)
- func (f *MockFullNode) SendRevertSignal(rs *RevertSignal)
- func (f *MockFullNode) StateAccountKey(_ context.Context, addr address.Address, _ types.TipSetKey) (address.Address, error)
- func (f *MockFullNode) StateGetActor(_ context.Context, addr address.Address, _ types.TipSetKey) (*types.Actor, error)
- func (f *MockFullNode) StateGetNetworkParams(_ context.Context) (*types.NetworkParams, error)
- func (f *MockFullNode) StateNetworkName(_ context.Context) (types.NetworkName, error)
- func (f *MockFullNode) StateNetworkVersion(_ context.Context, _ types.TipSetKey) (network.Version, error)
- func (f *MockFullNode) StateSearchMsg(_ context.Context, _ types.TipSetKey, msgCid cid.Cid, _ abi.ChainEpoch, _ bool) (*types.MsgLookup, error)
- type RevertSignal
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefGasUsed = int64(10000) DefGasPremium = abi.NewTokenAmount(1000) DefGasFeeCap = abi.NewTokenAmount(10000) DefBaseFee = abi.NewTokenAmount(1000) DefGasOverEstimation = 1.25 DefGasOverPremium = 4.0 DefMaxFee = big.Mul(big.NewInt(DefGasUsed*10), DefGasFeeCap) // MinPackedPremium If the gas premium is lower than this value, the message will not be packaged MinPackedPremium = abi.NewTokenAmount(500) DefReplaceByFeePercent types.Percent = 125 )
View Source
var ErrGasLimitNegative = errors.New("gas limit is negative")
Functions ¶
func GenBlockHead ¶
func GenBlockHead(miner address.Address, height abi.ChainEpoch, parents []cid.Cid) (*shared.BlockHeader, error)
func MockReplaceMessageParams ¶
func MockReplaceMessageParams() []*types.ReplacMessageParams
func MockSendSpecs ¶
func MsgGroupByAddress ¶
func NewMessage ¶
func NewMessages ¶
func NewShareSignedMessage ¶
func NewShareSignedMessage() *shared.SignedMessage
func NewShareSignedMessages ¶
func NewShareSignedMessages(count int) []*shared.SignedMessage
func NewSignedMessages ¶
func NewUnsignedMessage ¶
func RandAddresses ¶
func ResolveAddr ¶
func ResolveAddrs ¶
func ResolveIDAddr ¶
func ResolveIDAddr(addr address.Address) (address.Address, error)
ResolveIDAddr convert a ID address to a BLS address
func SliceToMap ¶
func SliceToMap(in interface{}) map[string]interface{}
Types ¶
type AuthClient ¶
type AuthClient struct {
*mocks.MockIAuthClient
}
func NewMockAuthClient ¶
func NewMockAuthClient(t *testing.T) *AuthClient
func (*AuthClient) Init ¶
func (m *AuthClient) Init(account string, addrs []address.Address)
func (*AuthClient) UpsertMiner ¶
type FullNodeServer ¶
type FullNodeServer struct { FullNode *mock.MockFullNode Stop func(ctx context.Context) error Port string Token string }
func MockFullNodeServer ¶
func MockFullNodeServer(t *testing.T) (*FullNodeServer, error)
type MockFullNode ¶
type MockFullNode struct { mockV1.MockFullNode // contains filtered or unexported fields }
func NewMockFullNode ¶
func (*MockFullNode) AddActors ¶
func (f *MockFullNode) AddActors(addrs []address.Address) error
func (*MockFullNode) ChainGetMessagesInTipset ¶
func (f *MockFullNode) ChainGetMessagesInTipset(_ context.Context, key types.TipSetKey) ([]types.MessageCID, error)
func (*MockFullNode) ChainGetParentMessages ¶
func (f *MockFullNode) ChainGetParentMessages(_ context.Context, bcid cid.Cid) ([]types.MessageCID, error)
func (*MockFullNode) ChainGetParentReceipts ¶
func (f *MockFullNode) ChainGetParentReceipts(_ context.Context, bcid cid.Cid) ([]*types.MessageReceipt, error)
func (*MockFullNode) ChainGetTipSet ¶
func (*MockFullNode) ChainNotify ¶
func (f *MockFullNode) ChainNotify(ctx context.Context) (<-chan []*types.HeadChange, error)
func (*MockFullNode) GasBatchEstimateMessageGas ¶
func (f *MockFullNode) GasBatchEstimateMessageGas(ctx context.Context, estimateMessages []*types.EstimateMessage, fromNonce uint64, tsk types.TipSetKey) ([]*types.EstimateResult, error)
func (*MockFullNode) GasEstimateMessageGas ¶
func (*MockFullNode) MpoolBatchPushUntrusted ¶
func (f *MockFullNode) MpoolBatchPushUntrusted(_ context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error)
func (*MockFullNode) MpoolGetConfig ¶
func (f *MockFullNode) MpoolGetConfig(_ context.Context) (*types.MpoolConfig, error)
func (*MockFullNode) SendRevertSignal ¶
func (f *MockFullNode) SendRevertSignal(rs *RevertSignal)
func (*MockFullNode) StateAccountKey ¶
func (*MockFullNode) StateGetActor ¶
func (*MockFullNode) StateGetNetworkParams ¶
func (f *MockFullNode) StateGetNetworkParams(_ context.Context) (*types.NetworkParams, error)
func (*MockFullNode) StateNetworkName ¶
func (f *MockFullNode) StateNetworkName(_ context.Context) (types.NetworkName, error)
func (*MockFullNode) StateNetworkVersion ¶
func (*MockFullNode) StateSearchMsg ¶
type RevertSignal ¶
Click to show internal directories.
Click to hide internal directories.