Documentation ¶
Index ¶
- type HeadersPoolStub
- func (hps *HeadersPoolStub) AddHeader(headerHash []byte, header data.HeaderHandler)
- func (hps *HeadersPoolStub) Clear()
- func (hps *HeadersPoolStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
- func (hps *HeadersPoolStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
- func (hps *HeadersPoolStub) GetNumHeaders(shardId uint32) int
- func (hps *HeadersPoolStub) IsInterfaceNil() bool
- func (hps *HeadersPoolStub) Len() int
- func (hps *HeadersPoolStub) MaxSize() int
- func (hps *HeadersPoolStub) Nonces(shardId uint32) []uint64
- func (hps *HeadersPoolStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
- func (hps *HeadersPoolStub) RemoveHeaderByHash(headerHash []byte)
- func (hps *HeadersPoolStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeadersPoolStub ¶
type HeadersPoolStub struct { AddCalled func(headerHash []byte, header data.HeaderHandler) RemoveHeaderByHashCalled func(headerHash []byte) RemoveHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) GetHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error) GetHeaderByHashCalled func(hash []byte) (data.HeaderHandler, error) ClearCalled func() RegisterHandlerCalled func(handler func(header data.HeaderHandler, shardHeaderHash []byte)) NoncesCalled func(shardId uint32) []uint64 LenCalled func() int MaxSizeCalled func() int GetNumHeadersCalled func(shardId uint32) int }
HeadersPoolStub -
func (*HeadersPoolStub) AddHeader ¶
func (hps *HeadersPoolStub) AddHeader(headerHash []byte, header data.HeaderHandler)
AddHeader -
func (*HeadersPoolStub) GetHeaderByHash ¶
func (hps *HeadersPoolStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
GetHeaderByHash -
func (*HeadersPoolStub) GetHeadersByNonceAndShardId ¶
func (hps *HeadersPoolStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
GetHeadersByNonceAndShardId -
func (*HeadersPoolStub) GetNumHeaders ¶
func (hps *HeadersPoolStub) GetNumHeaders(shardId uint32) int
GetNumHeaders -
func (*HeadersPoolStub) IsInterfaceNil ¶
func (hps *HeadersPoolStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeadersPoolStub) Nonces ¶
func (hps *HeadersPoolStub) Nonces(shardId uint32) []uint64
Nonces -
func (*HeadersPoolStub) RegisterHandler ¶
func (hps *HeadersPoolStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
RegisterHandler -
func (*HeadersPoolStub) RemoveHeaderByHash ¶
func (hps *HeadersPoolStub) RemoveHeaderByHash(headerHash []byte)
RemoveHeaderByHash -
func (*HeadersPoolStub) RemoveHeaderByNonceAndShardId ¶
func (hps *HeadersPoolStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
RemoveHeaderByNonceAndShardId -
Click to show internal directories.
Click to hide internal directories.