Documentation ¶
Index ¶
- type MockProvider
- func (p *MockProvider) ChainName() string
- func (p *MockProvider) DeleteMessage(msg *types.Message)
- func (p *MockProvider) FinalityBlock(ctx context.Context) uint64
- func (p *MockProvider) FindMessages() []*types.Message
- func (ip *MockProvider) GenerateMessage(ctx context.Context, key *providerTypes.MessageKeyWithMessageHeight) (*providerTypes.Message, error)
- func (p *MockProvider) Init(ctx context.Context) error
- func (p *MockProvider) Listener(ctx context.Context, lastSavedHeight uint64, incoming chan types.BlockInfo) error
- func (p *MockProvider) MessageReceived(ctx context.Context, key types.MessageKey) (bool, error)
- func (p *MockProvider) NID() string
- func (p *MockProvider) ProviderConfig() provider.Config
- func (p *MockProvider) QueryBalance(ctx context.Context, addr string) (*types.Coin, error)
- func (p *MockProvider) QueryLatestHeight(ctx context.Context) (uint64, error)
- func (p *MockProvider) QueryTransactionReceipt(ctx context.Context, txHash string) (*types.Receipt, error)
- func (p *MockProvider) Route(ctx context.Context, message *types.Message, callback types.TxResponseFunc) error
- func (p *MockProvider) ShouldReceiveMessage(ctx context.Context, messagekey types.Message) (bool, error)
- func (p *MockProvider) ShouldSendMessage(ctx context.Context, messageKey types.Message) (bool, error)
- func (p *MockProvider) Type() string
- type MockProviderConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockProvider ¶
type MockProvider struct { PCfg *MockProviderConfig Height uint64 // contains filtered or unexported fields }
func (*MockProvider) ChainName ¶
func (p *MockProvider) ChainName() string
func (*MockProvider) DeleteMessage ¶
func (p *MockProvider) DeleteMessage(msg *types.Message)
func (*MockProvider) FinalityBlock ¶
func (p *MockProvider) FinalityBlock(ctx context.Context) uint64
func (*MockProvider) FindMessages ¶
func (p *MockProvider) FindMessages() []*types.Message
func (*MockProvider) GenerateMessage ¶
func (ip *MockProvider) GenerateMessage(ctx context.Context, key *providerTypes.MessageKeyWithMessageHeight) (*providerTypes.Message, error)
func (*MockProvider) MessageReceived ¶
func (p *MockProvider) MessageReceived(ctx context.Context, key types.MessageKey) (bool, error)
func (*MockProvider) NID ¶
func (p *MockProvider) NID() string
func (*MockProvider) ProviderConfig ¶
func (p *MockProvider) ProviderConfig() provider.Config
func (*MockProvider) QueryBalance ¶
func (*MockProvider) QueryLatestHeight ¶
func (p *MockProvider) QueryLatestHeight(ctx context.Context) (uint64, error)
func (*MockProvider) QueryTransactionReceipt ¶
func (*MockProvider) Route ¶
func (p *MockProvider) Route(ctx context.Context, message *types.Message, callback types.TxResponseFunc) error
func (*MockProvider) ShouldReceiveMessage ¶
func (*MockProvider) ShouldSendMessage ¶
func (*MockProvider) Type ¶
func (p *MockProvider) Type() string
type MockProviderConfig ¶
type MockProviderConfig struct { NId string BlockDuration time.Duration SendMessages map[types.MessageKey]*types.Message ReceiveMessages map[types.MessageKey]*types.Message StartHeight uint64 // contains filtered or unexported fields }
func (*MockProviderConfig) NewProvider ¶
func (pp *MockProviderConfig) NewProvider(log *zap.Logger, homepath string, debug bool, chainName string) (provider.ChainProvider, error)
NewProvider should provide a new Mock provider
func (*MockProviderConfig) Validate ¶
func (pp *MockProviderConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.