clientmock

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2023 License: AGPL-3.0, ISC Imports: 5 Imported by: 0

Documentation

Index

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) GetBlock

func (c *MockAlphabillClient) GetBlock(ctx context.Context, blockNumber uint64) (*block.Block, error)

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 (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL