Documentation
¶
Index ¶
- type MockBTCClient
- func (_m *MockBTCClient) BlockEventChannel() <-chan *btc.BlockEvent
- func (_m *MockBTCClient) EXPECT() *MockBTCClient_Expecter
- func (_m *MockBTCClient) GetBTCBlockByHash(blockHash *chainhash.Hash) (*types.IndexedBlock, error)
- func (_m *MockBTCClient) GetBTCBlockByHeight(height int64) (*types.IndexedBlock, error)
- func (_m *MockBTCClient) GetBTCBlockHeaderByHeight(height int64) (*wire.BlockHeader, error)
- func (_m *MockBTCClient) GetBTCTailBlocksByHeight(height int64, fullBlocks bool) ([]*types.IndexedBlock, error)
- func (_m *MockBTCClient) GetBTCTipBlock() (*chainhash.Hash, int64, error)
- func (_m *MockBTCClient) Stop()
- func (_m *MockBTCClient) SubscribeNewBlocks()
- func (_m *MockBTCClient) WaitForShutdown()
- type MockBTCClient_BlockEventChannel_Call
- func (_c *MockBTCClient_BlockEventChannel_Call) Return(_a0 <-chan *btc.BlockEvent) *MockBTCClient_BlockEventChannel_Call
- func (_c *MockBTCClient_BlockEventChannel_Call) Run(run func()) *MockBTCClient_BlockEventChannel_Call
- func (_c *MockBTCClient_BlockEventChannel_Call) RunAndReturn(run func() <-chan *btc.BlockEvent) *MockBTCClient_BlockEventChannel_Call
- type MockBTCClient_Expecter
- func (_e *MockBTCClient_Expecter) BlockEventChannel() *MockBTCClient_BlockEventChannel_Call
- func (_e *MockBTCClient_Expecter) GetBTCBlockByHash(blockHash interface{}) *MockBTCClient_GetBTCBlockByHash_Call
- func (_e *MockBTCClient_Expecter) GetBTCBlockByHeight(height interface{}) *MockBTCClient_GetBTCBlockByHeight_Call
- func (_e *MockBTCClient_Expecter) GetBTCBlockHeaderByHeight(height interface{}) *MockBTCClient_GetBTCBlockHeaderByHeight_Call
- func (_e *MockBTCClient_Expecter) GetBTCTailBlocksByHeight(height interface{}, fullBlocks interface{}) *MockBTCClient_GetBTCTailBlocksByHeight_Call
- func (_e *MockBTCClient_Expecter) GetBTCTipBlock() *MockBTCClient_GetBTCTipBlock_Call
- func (_e *MockBTCClient_Expecter) Stop() *MockBTCClient_Stop_Call
- func (_e *MockBTCClient_Expecter) SubscribeNewBlocks() *MockBTCClient_SubscribeNewBlocks_Call
- func (_e *MockBTCClient_Expecter) WaitForShutdown() *MockBTCClient_WaitForShutdown_Call
- type MockBTCClient_GetBTCBlockByHash_Call
- func (_c *MockBTCClient_GetBTCBlockByHash_Call) Return(_a0 *types.IndexedBlock, _a1 error) *MockBTCClient_GetBTCBlockByHash_Call
- func (_c *MockBTCClient_GetBTCBlockByHash_Call) Run(run func(blockHash *chainhash.Hash)) *MockBTCClient_GetBTCBlockByHash_Call
- func (_c *MockBTCClient_GetBTCBlockByHash_Call) RunAndReturn(run func(*chainhash.Hash) (*types.IndexedBlock, error)) *MockBTCClient_GetBTCBlockByHash_Call
- type MockBTCClient_GetBTCBlockByHeight_Call
- func (_c *MockBTCClient_GetBTCBlockByHeight_Call) Return(_a0 *types.IndexedBlock, _a1 error) *MockBTCClient_GetBTCBlockByHeight_Call
- func (_c *MockBTCClient_GetBTCBlockByHeight_Call) Run(run func(height int64)) *MockBTCClient_GetBTCBlockByHeight_Call
- func (_c *MockBTCClient_GetBTCBlockByHeight_Call) RunAndReturn(run func(int64) (*types.IndexedBlock, error)) *MockBTCClient_GetBTCBlockByHeight_Call
- type MockBTCClient_GetBTCBlockHeaderByHeight_Call
- func (_c *MockBTCClient_GetBTCBlockHeaderByHeight_Call) Return(_a0 *wire.BlockHeader, _a1 error) *MockBTCClient_GetBTCBlockHeaderByHeight_Call
- func (_c *MockBTCClient_GetBTCBlockHeaderByHeight_Call) Run(run func(height int64)) *MockBTCClient_GetBTCBlockHeaderByHeight_Call
- func (_c *MockBTCClient_GetBTCBlockHeaderByHeight_Call) RunAndReturn(run func(int64) (*wire.BlockHeader, error)) *MockBTCClient_GetBTCBlockHeaderByHeight_Call
- type MockBTCClient_GetBTCTailBlocksByHeight_Call
- func (_c *MockBTCClient_GetBTCTailBlocksByHeight_Call) Return(_a0 []*types.IndexedBlock, _a1 error) *MockBTCClient_GetBTCTailBlocksByHeight_Call
- func (_c *MockBTCClient_GetBTCTailBlocksByHeight_Call) Run(run func(height int64, fullBlocks bool)) *MockBTCClient_GetBTCTailBlocksByHeight_Call
- func (_c *MockBTCClient_GetBTCTailBlocksByHeight_Call) RunAndReturn(run func(int64, bool) ([]*types.IndexedBlock, error)) *MockBTCClient_GetBTCTailBlocksByHeight_Call
- type MockBTCClient_GetBTCTipBlock_Call
- func (_c *MockBTCClient_GetBTCTipBlock_Call) Return(_a0 *chainhash.Hash, _a1 int64, _a2 error) *MockBTCClient_GetBTCTipBlock_Call
- func (_c *MockBTCClient_GetBTCTipBlock_Call) Run(run func()) *MockBTCClient_GetBTCTipBlock_Call
- func (_c *MockBTCClient_GetBTCTipBlock_Call) RunAndReturn(run func() (*chainhash.Hash, int64, error)) *MockBTCClient_GetBTCTipBlock_Call
- type MockBTCClient_Stop_Call
- type MockBTCClient_SubscribeNewBlocks_Call
- func (_c *MockBTCClient_SubscribeNewBlocks_Call) Return() *MockBTCClient_SubscribeNewBlocks_Call
- func (_c *MockBTCClient_SubscribeNewBlocks_Call) Run(run func()) *MockBTCClient_SubscribeNewBlocks_Call
- func (_c *MockBTCClient_SubscribeNewBlocks_Call) RunAndReturn(run func()) *MockBTCClient_SubscribeNewBlocks_Call
- type MockBTCClient_WaitForShutdown_Call
- type MockBitcoinSPV
- func (_m *MockBitcoinSPV) ContainsBlock(ctx context.Context, blockHash chainhash.Hash) (bool, error)
- func (_m *MockBitcoinSPV) EXPECT() *MockBitcoinSPV_Expecter
- func (_m *MockBitcoinSPV) GetLatestBlockInfo(ctx context.Context) (*clients.BlockInfo, error)
- func (_m *MockBitcoinSPV) InsertHeaders(ctx context.Context, blockHeaders []wire.BlockHeader) error
- func (_m *MockBitcoinSPV) Stop()
- type MockBitcoinSPV_ContainsBlock_Call
- func (_c *MockBitcoinSPV_ContainsBlock_Call) Return(_a0 bool, _a1 error) *MockBitcoinSPV_ContainsBlock_Call
- func (_c *MockBitcoinSPV_ContainsBlock_Call) Run(run func(ctx context.Context, blockHash chainhash.Hash)) *MockBitcoinSPV_ContainsBlock_Call
- func (_c *MockBitcoinSPV_ContainsBlock_Call) RunAndReturn(run func(context.Context, chainhash.Hash) (bool, error)) *MockBitcoinSPV_ContainsBlock_Call
- type MockBitcoinSPV_Expecter
- func (_e *MockBitcoinSPV_Expecter) ContainsBlock(ctx interface{}, blockHash interface{}) *MockBitcoinSPV_ContainsBlock_Call
- func (_e *MockBitcoinSPV_Expecter) GetLatestBlockInfo(ctx interface{}) *MockBitcoinSPV_GetLatestBlockInfo_Call
- func (_e *MockBitcoinSPV_Expecter) InsertHeaders(ctx interface{}, blockHeaders interface{}) *MockBitcoinSPV_InsertHeaders_Call
- func (_e *MockBitcoinSPV_Expecter) Stop() *MockBitcoinSPV_Stop_Call
- type MockBitcoinSPV_GetLatestBlockInfo_Call
- func (_c *MockBitcoinSPV_GetLatestBlockInfo_Call) Return(_a0 *clients.BlockInfo, _a1 error) *MockBitcoinSPV_GetLatestBlockInfo_Call
- func (_c *MockBitcoinSPV_GetLatestBlockInfo_Call) Run(run func(ctx context.Context)) *MockBitcoinSPV_GetLatestBlockInfo_Call
- func (_c *MockBitcoinSPV_GetLatestBlockInfo_Call) RunAndReturn(run func(context.Context) (*clients.BlockInfo, error)) *MockBitcoinSPV_GetLatestBlockInfo_Call
- type MockBitcoinSPV_InsertHeaders_Call
- func (_c *MockBitcoinSPV_InsertHeaders_Call) Return(_a0 error) *MockBitcoinSPV_InsertHeaders_Call
- func (_c *MockBitcoinSPV_InsertHeaders_Call) Run(run func(ctx context.Context, blockHeaders []wire.BlockHeader)) *MockBitcoinSPV_InsertHeaders_Call
- func (_c *MockBitcoinSPV_InsertHeaders_Call) RunAndReturn(run func(context.Context, []wire.BlockHeader) error) *MockBitcoinSPV_InsertHeaders_Call
- type MockBitcoinSPV_Stop_Call
- type MockIndexer
- type MockIndexer_Expecter
- type MockIndexer_GetLatestHeight_Call
- func (_c *MockIndexer_GetLatestHeight_Call) Return(_a0 int64, _a1 error) *MockIndexer_GetLatestHeight_Call
- func (_c *MockIndexer_GetLatestHeight_Call) Run(run func()) *MockIndexer_GetLatestHeight_Call
- func (_c *MockIndexer_GetLatestHeight_Call) RunAndReturn(run func() (int64, error)) *MockIndexer_GetLatestHeight_Call
- type MockIndexer_SendBlocks_Call
- func (_c *MockIndexer_SendBlocks_Call) Return(_a0 error) *MockIndexer_SendBlocks_Call
- func (_c *MockIndexer_SendBlocks_Call) Run(run func(ctx context.Context, blocks []*types.IndexedBlock)) *MockIndexer_SendBlocks_Call
- func (_c *MockIndexer_SendBlocks_Call) RunAndReturn(run func(context.Context, []*types.IndexedBlock) error) *MockIndexer_SendBlocks_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockBTCClient ¶
MockBTCClient is an autogenerated mock type for the BTCClient type
func NewMockBTCClient ¶
func NewMockBTCClient(t interface { mock.TestingT Cleanup(func()) }) *MockBTCClient
NewMockBTCClient creates a new instance of MockBTCClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockBTCClient) BlockEventChannel ¶
func (_m *MockBTCClient) BlockEventChannel() <-chan *btc.BlockEvent
BlockEventChannel provides a mock function with no fields
func (*MockBTCClient) EXPECT ¶
func (_m *MockBTCClient) EXPECT() *MockBTCClient_Expecter
func (*MockBTCClient) GetBTCBlockByHash ¶
func (_m *MockBTCClient) GetBTCBlockByHash(blockHash *chainhash.Hash) (*types.IndexedBlock, error)
GetBTCBlockByHash provides a mock function with given fields: blockHash
func (*MockBTCClient) GetBTCBlockByHeight ¶
func (_m *MockBTCClient) GetBTCBlockByHeight(height int64) (*types.IndexedBlock, error)
GetBTCBlockByHeight provides a mock function with given fields: height
func (*MockBTCClient) GetBTCBlockHeaderByHeight ¶
func (_m *MockBTCClient) GetBTCBlockHeaderByHeight(height int64) (*wire.BlockHeader, error)
GetBTCBlockHeaderByHeight provides a mock function with given fields: height
func (*MockBTCClient) GetBTCTailBlocksByHeight ¶
func (_m *MockBTCClient) GetBTCTailBlocksByHeight(height int64, fullBlocks bool) ([]*types.IndexedBlock, error)
GetBTCTailBlocksByHeight provides a mock function with given fields: height, fullBlocks
func (*MockBTCClient) GetBTCTipBlock ¶
func (_m *MockBTCClient) GetBTCTipBlock() (*chainhash.Hash, int64, error)
GetBTCTipBlock provides a mock function with no fields
func (*MockBTCClient) Stop ¶
func (_m *MockBTCClient) Stop()
Stop provides a mock function with no fields
func (*MockBTCClient) SubscribeNewBlocks ¶
func (_m *MockBTCClient) SubscribeNewBlocks()
SubscribeNewBlocks provides a mock function with no fields
func (*MockBTCClient) WaitForShutdown ¶
func (_m *MockBTCClient) WaitForShutdown()
WaitForShutdown provides a mock function with no fields
type MockBTCClient_BlockEventChannel_Call ¶
MockBTCClient_BlockEventChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockEventChannel'
func (*MockBTCClient_BlockEventChannel_Call) Return ¶
func (_c *MockBTCClient_BlockEventChannel_Call) Return(_a0 <-chan *btc.BlockEvent) *MockBTCClient_BlockEventChannel_Call
func (*MockBTCClient_BlockEventChannel_Call) Run ¶
func (_c *MockBTCClient_BlockEventChannel_Call) Run(run func()) *MockBTCClient_BlockEventChannel_Call
func (*MockBTCClient_BlockEventChannel_Call) RunAndReturn ¶
func (_c *MockBTCClient_BlockEventChannel_Call) RunAndReturn(run func() <-chan *btc.BlockEvent) *MockBTCClient_BlockEventChannel_Call
type MockBTCClient_Expecter ¶
type MockBTCClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockBTCClient_Expecter) BlockEventChannel ¶
func (_e *MockBTCClient_Expecter) BlockEventChannel() *MockBTCClient_BlockEventChannel_Call
BlockEventChannel is a helper method to define mock.On call
func (*MockBTCClient_Expecter) GetBTCBlockByHash ¶
func (_e *MockBTCClient_Expecter) GetBTCBlockByHash(blockHash interface{}) *MockBTCClient_GetBTCBlockByHash_Call
GetBTCBlockByHash is a helper method to define mock.On call
- blockHash *chainhash.Hash
func (*MockBTCClient_Expecter) GetBTCBlockByHeight ¶
func (_e *MockBTCClient_Expecter) GetBTCBlockByHeight(height interface{}) *MockBTCClient_GetBTCBlockByHeight_Call
GetBTCBlockByHeight is a helper method to define mock.On call
- height int64
func (*MockBTCClient_Expecter) GetBTCBlockHeaderByHeight ¶
func (_e *MockBTCClient_Expecter) GetBTCBlockHeaderByHeight(height interface{}) *MockBTCClient_GetBTCBlockHeaderByHeight_Call
GetBTCBlockHeaderByHeight is a helper method to define mock.On call
- height int64
func (*MockBTCClient_Expecter) GetBTCTailBlocksByHeight ¶
func (_e *MockBTCClient_Expecter) GetBTCTailBlocksByHeight(height interface{}, fullBlocks interface{}) *MockBTCClient_GetBTCTailBlocksByHeight_Call
GetBTCTailBlocksByHeight is a helper method to define mock.On call
- height int64
- fullBlocks bool
func (*MockBTCClient_Expecter) GetBTCTipBlock ¶
func (_e *MockBTCClient_Expecter) GetBTCTipBlock() *MockBTCClient_GetBTCTipBlock_Call
GetBTCTipBlock is a helper method to define mock.On call
func (*MockBTCClient_Expecter) Stop ¶
func (_e *MockBTCClient_Expecter) Stop() *MockBTCClient_Stop_Call
Stop is a helper method to define mock.On call
func (*MockBTCClient_Expecter) SubscribeNewBlocks ¶
func (_e *MockBTCClient_Expecter) SubscribeNewBlocks() *MockBTCClient_SubscribeNewBlocks_Call
SubscribeNewBlocks is a helper method to define mock.On call
func (*MockBTCClient_Expecter) WaitForShutdown ¶
func (_e *MockBTCClient_Expecter) WaitForShutdown() *MockBTCClient_WaitForShutdown_Call
WaitForShutdown is a helper method to define mock.On call
type MockBTCClient_GetBTCBlockByHash_Call ¶
MockBTCClient_GetBTCBlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBTCBlockByHash'
func (*MockBTCClient_GetBTCBlockByHash_Call) Return ¶
func (_c *MockBTCClient_GetBTCBlockByHash_Call) Return(_a0 *types.IndexedBlock, _a1 error) *MockBTCClient_GetBTCBlockByHash_Call
func (*MockBTCClient_GetBTCBlockByHash_Call) Run ¶
func (_c *MockBTCClient_GetBTCBlockByHash_Call) Run(run func(blockHash *chainhash.Hash)) *MockBTCClient_GetBTCBlockByHash_Call
func (*MockBTCClient_GetBTCBlockByHash_Call) RunAndReturn ¶
func (_c *MockBTCClient_GetBTCBlockByHash_Call) RunAndReturn(run func(*chainhash.Hash) (*types.IndexedBlock, error)) *MockBTCClient_GetBTCBlockByHash_Call
type MockBTCClient_GetBTCBlockByHeight_Call ¶
MockBTCClient_GetBTCBlockByHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBTCBlockByHeight'
func (*MockBTCClient_GetBTCBlockByHeight_Call) Return ¶
func (_c *MockBTCClient_GetBTCBlockByHeight_Call) Return(_a0 *types.IndexedBlock, _a1 error) *MockBTCClient_GetBTCBlockByHeight_Call
func (*MockBTCClient_GetBTCBlockByHeight_Call) Run ¶
func (_c *MockBTCClient_GetBTCBlockByHeight_Call) Run(run func(height int64)) *MockBTCClient_GetBTCBlockByHeight_Call
func (*MockBTCClient_GetBTCBlockByHeight_Call) RunAndReturn ¶
func (_c *MockBTCClient_GetBTCBlockByHeight_Call) RunAndReturn(run func(int64) (*types.IndexedBlock, error)) *MockBTCClient_GetBTCBlockByHeight_Call
type MockBTCClient_GetBTCBlockHeaderByHeight_Call ¶
MockBTCClient_GetBTCBlockHeaderByHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBTCBlockHeaderByHeight'
func (*MockBTCClient_GetBTCBlockHeaderByHeight_Call) Return ¶
func (_c *MockBTCClient_GetBTCBlockHeaderByHeight_Call) Return(_a0 *wire.BlockHeader, _a1 error) *MockBTCClient_GetBTCBlockHeaderByHeight_Call
func (*MockBTCClient_GetBTCBlockHeaderByHeight_Call) Run ¶
func (_c *MockBTCClient_GetBTCBlockHeaderByHeight_Call) Run(run func(height int64)) *MockBTCClient_GetBTCBlockHeaderByHeight_Call
func (*MockBTCClient_GetBTCBlockHeaderByHeight_Call) RunAndReturn ¶
func (_c *MockBTCClient_GetBTCBlockHeaderByHeight_Call) RunAndReturn(run func(int64) (*wire.BlockHeader, error)) *MockBTCClient_GetBTCBlockHeaderByHeight_Call
type MockBTCClient_GetBTCTailBlocksByHeight_Call ¶
MockBTCClient_GetBTCTailBlocksByHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBTCTailBlocksByHeight'
func (*MockBTCClient_GetBTCTailBlocksByHeight_Call) Return ¶
func (_c *MockBTCClient_GetBTCTailBlocksByHeight_Call) Return(_a0 []*types.IndexedBlock, _a1 error) *MockBTCClient_GetBTCTailBlocksByHeight_Call
func (*MockBTCClient_GetBTCTailBlocksByHeight_Call) Run ¶
func (_c *MockBTCClient_GetBTCTailBlocksByHeight_Call) Run(run func(height int64, fullBlocks bool)) *MockBTCClient_GetBTCTailBlocksByHeight_Call
func (*MockBTCClient_GetBTCTailBlocksByHeight_Call) RunAndReturn ¶
func (_c *MockBTCClient_GetBTCTailBlocksByHeight_Call) RunAndReturn(run func(int64, bool) ([]*types.IndexedBlock, error)) *MockBTCClient_GetBTCTailBlocksByHeight_Call
type MockBTCClient_GetBTCTipBlock_Call ¶
MockBTCClient_GetBTCTipBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBTCTipBlock'
func (*MockBTCClient_GetBTCTipBlock_Call) Return ¶
func (_c *MockBTCClient_GetBTCTipBlock_Call) Return(_a0 *chainhash.Hash, _a1 int64, _a2 error) *MockBTCClient_GetBTCTipBlock_Call
func (*MockBTCClient_GetBTCTipBlock_Call) Run ¶
func (_c *MockBTCClient_GetBTCTipBlock_Call) Run(run func()) *MockBTCClient_GetBTCTipBlock_Call
func (*MockBTCClient_GetBTCTipBlock_Call) RunAndReturn ¶
func (_c *MockBTCClient_GetBTCTipBlock_Call) RunAndReturn(run func() (*chainhash.Hash, int64, error)) *MockBTCClient_GetBTCTipBlock_Call
type MockBTCClient_Stop_Call ¶
MockBTCClient_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
func (*MockBTCClient_Stop_Call) Return ¶
func (_c *MockBTCClient_Stop_Call) Return() *MockBTCClient_Stop_Call
func (*MockBTCClient_Stop_Call) Run ¶
func (_c *MockBTCClient_Stop_Call) Run(run func()) *MockBTCClient_Stop_Call
func (*MockBTCClient_Stop_Call) RunAndReturn ¶
func (_c *MockBTCClient_Stop_Call) RunAndReturn(run func()) *MockBTCClient_Stop_Call
type MockBTCClient_SubscribeNewBlocks_Call ¶
MockBTCClient_SubscribeNewBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewBlocks'
func (*MockBTCClient_SubscribeNewBlocks_Call) Return ¶
func (_c *MockBTCClient_SubscribeNewBlocks_Call) Return() *MockBTCClient_SubscribeNewBlocks_Call
func (*MockBTCClient_SubscribeNewBlocks_Call) Run ¶
func (_c *MockBTCClient_SubscribeNewBlocks_Call) Run(run func()) *MockBTCClient_SubscribeNewBlocks_Call
func (*MockBTCClient_SubscribeNewBlocks_Call) RunAndReturn ¶
func (_c *MockBTCClient_SubscribeNewBlocks_Call) RunAndReturn(run func()) *MockBTCClient_SubscribeNewBlocks_Call
type MockBTCClient_WaitForShutdown_Call ¶
MockBTCClient_WaitForShutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForShutdown'
func (*MockBTCClient_WaitForShutdown_Call) Return ¶
func (_c *MockBTCClient_WaitForShutdown_Call) Return() *MockBTCClient_WaitForShutdown_Call
func (*MockBTCClient_WaitForShutdown_Call) Run ¶
func (_c *MockBTCClient_WaitForShutdown_Call) Run(run func()) *MockBTCClient_WaitForShutdown_Call
func (*MockBTCClient_WaitForShutdown_Call) RunAndReturn ¶
func (_c *MockBTCClient_WaitForShutdown_Call) RunAndReturn(run func()) *MockBTCClient_WaitForShutdown_Call
type MockBitcoinSPV ¶
MockBitcoinSPV is an autogenerated mock type for the BitcoinSPV type
func NewMockBitcoinSPV ¶
func NewMockBitcoinSPV(t interface { mock.TestingT Cleanup(func()) }) *MockBitcoinSPV
NewMockBitcoinSPV creates a new instance of MockBitcoinSPV. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockBitcoinSPV) ContainsBlock ¶
func (_m *MockBitcoinSPV) ContainsBlock(ctx context.Context, blockHash chainhash.Hash) (bool, error)
ContainsBlock provides a mock function with given fields: ctx, blockHash
func (*MockBitcoinSPV) EXPECT ¶
func (_m *MockBitcoinSPV) EXPECT() *MockBitcoinSPV_Expecter
func (*MockBitcoinSPV) GetLatestBlockInfo ¶
GetLatestBlockInfo provides a mock function with given fields: ctx
func (*MockBitcoinSPV) InsertHeaders ¶
func (_m *MockBitcoinSPV) InsertHeaders(ctx context.Context, blockHeaders []wire.BlockHeader) error
InsertHeaders provides a mock function with given fields: ctx, blockHeaders
func (*MockBitcoinSPV) Stop ¶
func (_m *MockBitcoinSPV) Stop()
Stop provides a mock function with no fields
type MockBitcoinSPV_ContainsBlock_Call ¶
MockBitcoinSPV_ContainsBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainsBlock'
func (*MockBitcoinSPV_ContainsBlock_Call) Return ¶
func (_c *MockBitcoinSPV_ContainsBlock_Call) Return(_a0 bool, _a1 error) *MockBitcoinSPV_ContainsBlock_Call
func (*MockBitcoinSPV_ContainsBlock_Call) Run ¶
func (_c *MockBitcoinSPV_ContainsBlock_Call) Run(run func(ctx context.Context, blockHash chainhash.Hash)) *MockBitcoinSPV_ContainsBlock_Call
func (*MockBitcoinSPV_ContainsBlock_Call) RunAndReturn ¶
func (_c *MockBitcoinSPV_ContainsBlock_Call) RunAndReturn(run func(context.Context, chainhash.Hash) (bool, error)) *MockBitcoinSPV_ContainsBlock_Call
type MockBitcoinSPV_Expecter ¶
type MockBitcoinSPV_Expecter struct {
// contains filtered or unexported fields
}
func (*MockBitcoinSPV_Expecter) ContainsBlock ¶
func (_e *MockBitcoinSPV_Expecter) ContainsBlock(ctx interface{}, blockHash interface{}) *MockBitcoinSPV_ContainsBlock_Call
ContainsBlock is a helper method to define mock.On call
- ctx context.Context
- blockHash chainhash.Hash
func (*MockBitcoinSPV_Expecter) GetLatestBlockInfo ¶
func (_e *MockBitcoinSPV_Expecter) GetLatestBlockInfo(ctx interface{}) *MockBitcoinSPV_GetLatestBlockInfo_Call
GetLatestBlockInfo is a helper method to define mock.On call
- ctx context.Context
func (*MockBitcoinSPV_Expecter) InsertHeaders ¶
func (_e *MockBitcoinSPV_Expecter) InsertHeaders(ctx interface{}, blockHeaders interface{}) *MockBitcoinSPV_InsertHeaders_Call
InsertHeaders is a helper method to define mock.On call
- ctx context.Context
- blockHeaders []wire.BlockHeader
func (*MockBitcoinSPV_Expecter) Stop ¶
func (_e *MockBitcoinSPV_Expecter) Stop() *MockBitcoinSPV_Stop_Call
Stop is a helper method to define mock.On call
type MockBitcoinSPV_GetLatestBlockInfo_Call ¶
MockBitcoinSPV_GetLatestBlockInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestBlockInfo'
func (*MockBitcoinSPV_GetLatestBlockInfo_Call) Return ¶
func (_c *MockBitcoinSPV_GetLatestBlockInfo_Call) Return(_a0 *clients.BlockInfo, _a1 error) *MockBitcoinSPV_GetLatestBlockInfo_Call
func (*MockBitcoinSPV_GetLatestBlockInfo_Call) Run ¶
func (_c *MockBitcoinSPV_GetLatestBlockInfo_Call) Run(run func(ctx context.Context)) *MockBitcoinSPV_GetLatestBlockInfo_Call
func (*MockBitcoinSPV_GetLatestBlockInfo_Call) RunAndReturn ¶
func (_c *MockBitcoinSPV_GetLatestBlockInfo_Call) RunAndReturn(run func(context.Context) (*clients.BlockInfo, error)) *MockBitcoinSPV_GetLatestBlockInfo_Call
type MockBitcoinSPV_InsertHeaders_Call ¶
MockBitcoinSPV_InsertHeaders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertHeaders'
func (*MockBitcoinSPV_InsertHeaders_Call) Return ¶
func (_c *MockBitcoinSPV_InsertHeaders_Call) Return(_a0 error) *MockBitcoinSPV_InsertHeaders_Call
func (*MockBitcoinSPV_InsertHeaders_Call) Run ¶
func (_c *MockBitcoinSPV_InsertHeaders_Call) Run(run func(ctx context.Context, blockHeaders []wire.BlockHeader)) *MockBitcoinSPV_InsertHeaders_Call
func (*MockBitcoinSPV_InsertHeaders_Call) RunAndReturn ¶
func (_c *MockBitcoinSPV_InsertHeaders_Call) RunAndReturn(run func(context.Context, []wire.BlockHeader) error) *MockBitcoinSPV_InsertHeaders_Call
type MockBitcoinSPV_Stop_Call ¶
MockBitcoinSPV_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
func (*MockBitcoinSPV_Stop_Call) Return ¶
func (_c *MockBitcoinSPV_Stop_Call) Return() *MockBitcoinSPV_Stop_Call
func (*MockBitcoinSPV_Stop_Call) Run ¶
func (_c *MockBitcoinSPV_Stop_Call) Run(run func()) *MockBitcoinSPV_Stop_Call
func (*MockBitcoinSPV_Stop_Call) RunAndReturn ¶
func (_c *MockBitcoinSPV_Stop_Call) RunAndReturn(run func()) *MockBitcoinSPV_Stop_Call
type MockIndexer ¶
MockIndexer is an autogenerated mock type for the Indexer type
func NewMockIndexer ¶
func NewMockIndexer(t interface { mock.TestingT Cleanup(func()) }) *MockIndexer
NewMockIndexer creates a new instance of MockIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockIndexer) EXPECT ¶
func (_m *MockIndexer) EXPECT() *MockIndexer_Expecter
func (*MockIndexer) GetLatestHeight ¶
func (_m *MockIndexer) GetLatestHeight() (int64, error)
GetLatestHeight provides a mock function with no fields
func (*MockIndexer) SendBlocks ¶
func (_m *MockIndexer) SendBlocks(ctx context.Context, blocks []*types.IndexedBlock) error
SendBlocks provides a mock function with given fields: ctx, blocks
type MockIndexer_Expecter ¶
type MockIndexer_Expecter struct {
// contains filtered or unexported fields
}
func (*MockIndexer_Expecter) GetLatestHeight ¶
func (_e *MockIndexer_Expecter) GetLatestHeight() *MockIndexer_GetLatestHeight_Call
GetLatestHeight is a helper method to define mock.On call
func (*MockIndexer_Expecter) SendBlocks ¶
func (_e *MockIndexer_Expecter) SendBlocks(ctx interface{}, blocks interface{}) *MockIndexer_SendBlocks_Call
SendBlocks is a helper method to define mock.On call
- ctx context.Context
- blocks []*types.IndexedBlock
type MockIndexer_GetLatestHeight_Call ¶
MockIndexer_GetLatestHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestHeight'
func (*MockIndexer_GetLatestHeight_Call) Return ¶
func (_c *MockIndexer_GetLatestHeight_Call) Return(_a0 int64, _a1 error) *MockIndexer_GetLatestHeight_Call
func (*MockIndexer_GetLatestHeight_Call) Run ¶
func (_c *MockIndexer_GetLatestHeight_Call) Run(run func()) *MockIndexer_GetLatestHeight_Call
func (*MockIndexer_GetLatestHeight_Call) RunAndReturn ¶
func (_c *MockIndexer_GetLatestHeight_Call) RunAndReturn(run func() (int64, error)) *MockIndexer_GetLatestHeight_Call
type MockIndexer_SendBlocks_Call ¶
MockIndexer_SendBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendBlocks'
func (*MockIndexer_SendBlocks_Call) Return ¶
func (_c *MockIndexer_SendBlocks_Call) Return(_a0 error) *MockIndexer_SendBlocks_Call
func (*MockIndexer_SendBlocks_Call) Run ¶
func (_c *MockIndexer_SendBlocks_Call) Run(run func(ctx context.Context, blocks []*types.IndexedBlock)) *MockIndexer_SendBlocks_Call
func (*MockIndexer_SendBlocks_Call) RunAndReturn ¶
func (_c *MockIndexer_SendBlocks_Call) RunAndReturn(run func(context.Context, []*types.IndexedBlock) error) *MockIndexer_SendBlocks_Call