Documentation ¶
Index ¶
- type MockAlphabillClient
- func (c *MockAlphabillClient) ClearRecordedTransactions()
- func (c *MockAlphabillClient) GetBlock(ctx context.Context, blockNumber uint64) (*block.Block, error)
- func (c *MockAlphabillClient) GetBlocks(ctx context.Context, blockNumber, blockCount uint64) (*alphabill.GetBlocksResponse, error)
- func (c *MockAlphabillClient) GetMaxBlockNumber(ctx context.Context) (uint64, error)
- func (c *MockAlphabillClient) GetRecordedTransactions() []*txsystem.Transaction
- func (c *MockAlphabillClient) IsShutdown() bool
- func (c *MockAlphabillClient) SendTransaction(ctx context.Context, tx *txsystem.Transaction) (*txsystem.TransactionResponse, error)
- func (c *MockAlphabillClient) SetBlock(b *block.Block)
- func (c *MockAlphabillClient) SetMaxBlockNumber(blockNumber uint64)
- func (c *MockAlphabillClient) SetTxResponse(txResponse *txsystem.TransactionResponse)
- func (c *MockAlphabillClient) Shutdown() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAlphabillClient ¶
type MockAlphabillClient struct {
// contains filtered or unexported fields
}
MockAlphabillClient for testing. NOT thread safe.
func NewMockAlphabillClient ¶
func NewMockAlphabillClient(maxBlockNumber uint64, blocks map[uint64]*block.Block) *MockAlphabillClient
func (*MockAlphabillClient) ClearRecordedTransactions ¶
func (c *MockAlphabillClient) ClearRecordedTransactions()
func (*MockAlphabillClient) GetBlocks ¶
func (c *MockAlphabillClient) GetBlocks(ctx context.Context, blockNumber, blockCount uint64) (*alphabill.GetBlocksResponse, error)
func (*MockAlphabillClient) GetMaxBlockNumber ¶
func (c *MockAlphabillClient) GetMaxBlockNumber(ctx context.Context) (uint64, error)
func (*MockAlphabillClient) GetRecordedTransactions ¶
func (c *MockAlphabillClient) GetRecordedTransactions() []*txsystem.Transaction
func (*MockAlphabillClient) IsShutdown ¶
func (c *MockAlphabillClient) IsShutdown() bool
func (*MockAlphabillClient) SendTransaction ¶
func (c *MockAlphabillClient) SendTransaction(ctx context.Context, tx *txsystem.Transaction) (*txsystem.TransactionResponse, error)
func (*MockAlphabillClient) SetBlock ¶
func (c *MockAlphabillClient) SetBlock(b *block.Block)
func (*MockAlphabillClient) SetMaxBlockNumber ¶
func (c *MockAlphabillClient) SetMaxBlockNumber(blockNumber uint64)
func (*MockAlphabillClient) SetTxResponse ¶
func (c *MockAlphabillClient) SetTxResponse(txResponse *txsystem.TransactionResponse)
func (*MockAlphabillClient) Shutdown ¶
func (c *MockAlphabillClient) Shutdown() error
Click to show internal directories.
Click to hide internal directories.