Documentation ¶
Index ¶
- func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
- func NewNonceHashConverterMock() *nonceHashConverterMock
- func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
- type CoordinatorStub
- func (coordinator *CoordinatorStub) CommunicationIdentifier(destShardID uint32) string
- func (coordinator *CoordinatorStub) ComputeId(address []byte) uint32
- func (coordinator *CoordinatorStub) IsInterfaceNil() bool
- func (coordinator *CoordinatorStub) NumberOfShards() uint32
- func (coordinator *CoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
- func (coordinator *CoordinatorStub) SelfId() uint32
- type CurrentNetworkEpochProviderStub
- type DataPackerStub
- type DebugHandler
- func (dh *DebugHandler) IsInterfaceNil() bool
- func (dh *DebugHandler) LogFailedToResolveData(topic string, hash []byte, err error)
- func (dh *DebugHandler) LogRequestedData(topic string, hashes [][]byte, numReqIntra int, numReqCross int)
- func (dh *DebugHandler) LogSucceededToResolveData(topic string, hash []byte)
- type EpochHandlerStub
- type HasherStub
- type HeaderRequesterStub
- func (stub *HeaderRequesterStub) IsInterfaceNil() bool
- func (stub *HeaderRequesterStub) NumPeersToQuery() (int, int)
- func (stub *HeaderRequesterStub) RequestDataFromHash(hash []byte, epoch uint32) error
- func (stub *HeaderRequesterStub) SetDebugHandler(handler dataRetriever.DebugHandler) error
- func (stub *HeaderRequesterStub) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
- func (stub *HeaderRequesterStub) SetNumPeersToQuery(intra int, cross int)
- type HeaderResolverStub
- func (hrs *HeaderResolverStub) Close() error
- func (hrs *HeaderResolverStub) IsInterfaceNil() bool
- func (hrs *HeaderResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID, _ p2p.MessageHandler) error
- func (hrs *HeaderResolverStub) SetDebugHandler(handler dataRetriever.DebugHandler) error
- func (hrs *HeaderResolverStub) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
- type HeadersCacherStub
- func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
- func (hcs *HeadersCacherStub) Clear()
- func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
- func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
- func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
- func (hcs *HeadersCacherStub) IsInterfaceNil() bool
- func (hcs *HeadersCacherStub) Len() int
- func (hcs *HeadersCacherStub) MaxSize() int
- func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
- func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
- func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
- func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
- type IntRandomizerStub
- type ManualEpochStartNotifierStub
- type MarshalizerMock
- type MarshalizerStub
- type MessageHandlerStub
- func (mhs *MessageHandlerStub) ConnectedPeers() []core.PeerID
- func (mhs *MessageHandlerStub) ConnectedPeersOnTopic(topic string) []core.PeerID
- func (mhs *MessageHandlerStub) ID() core.PeerID
- func (mhs *MessageHandlerStub) IsConnected(peerID core.PeerID) bool
- func (mhs *MessageHandlerStub) IsInterfaceNil() bool
- func (mhs *MessageHandlerStub) SendToConnectedPeer(topic string, buff []byte, peerID core.PeerID) error
- type P2PAntifloodHandlerStub
- func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, ...) error
- func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
- type PeerListCreatorStub
- type RequestedItemsHandlerStub
- type ResolverStub
- type ThrottlerStub
- type TopicResolverSenderStub
- func (trss *TopicResolverSenderStub) DebugHandler() dataRetriever.DebugHandler
- func (trss *TopicResolverSenderStub) IsInterfaceNil() bool
- func (trss *TopicResolverSenderStub) RequestTopic() string
- func (trss *TopicResolverSenderStub) Send(buff []byte, peer core.PeerID, source p2p.MessageHandler) error
- func (trss *TopicResolverSenderStub) SetDebugHandler(handler dataRetriever.DebugHandler) error
- func (trss *TopicResolverSenderStub) TargetShardID() uint32
- type TxForCurrentBlockStub
- type Uint64ByteSliceConverterMock
- type ValidatorInfoForCurrentEpochStub
- func (v *ValidatorInfoForCurrentEpochStub) AddValidatorInfo(validatorInfoHash []byte, validatorInfo *state.ShardValidatorInfo)
- func (v *ValidatorInfoForCurrentEpochStub) Clean()
- func (v *ValidatorInfoForCurrentEpochStub) GetValidatorInfo(validatorInfoHash []byte) (*state.ShardValidatorInfo, error)
- func (v *ValidatorInfoForCurrentEpochStub) IsInterfaceNil() bool
- type WhiteListHandlerStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMultipleShardsCoordinatorMock ¶
func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
NewMultipleShardsCoordinatorMock -
func NewNonceHashConverterMock ¶
func NewNonceHashConverterMock() *nonceHashConverterMock
NewNonceHashConverterMock -
func NewOneShardCoordinatorMock ¶
func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
NewOneShardCoordinatorMock -
Types ¶
type CoordinatorStub ¶
type CoordinatorStub struct { NumberOfShardsCalled func() uint32 ComputeIdCalled func(address []byte) uint32 SelfIdCalled func() uint32 SameShardCalled func(firstAddress, secondAddress []byte) bool CommunicationIdentifierCalled func(destShardID uint32) string }
CoordinatorStub -
func (*CoordinatorStub) CommunicationIdentifier ¶
func (coordinator *CoordinatorStub) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*CoordinatorStub) ComputeId ¶
func (coordinator *CoordinatorStub) ComputeId(address []byte) uint32
ComputeId -
func (*CoordinatorStub) IsInterfaceNil ¶
func (coordinator *CoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*CoordinatorStub) NumberOfShards ¶
func (coordinator *CoordinatorStub) NumberOfShards() uint32
NumberOfShards -
func (*CoordinatorStub) SameShard ¶
func (coordinator *CoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
SameShard -
type CurrentNetworkEpochProviderStub ¶
type CurrentNetworkEpochProviderStub struct { EpochIsActiveInNetworkCalled func(epoch uint32) bool EpochConfirmedCalled func(newEpoch uint32, newTimestamp uint64) }
CurrentNetworkEpochProviderStub -
func (*CurrentNetworkEpochProviderStub) EpochConfirmed ¶
func (cneps *CurrentNetworkEpochProviderStub) EpochConfirmed(newEpoch uint32, newTimestamp uint64)
EpochConfirmed -
func (*CurrentNetworkEpochProviderStub) EpochIsActiveInNetwork ¶
func (cneps *CurrentNetworkEpochProviderStub) EpochIsActiveInNetwork(epoch uint32) bool
EpochIsActiveInNetwork -
func (*CurrentNetworkEpochProviderStub) IsInterfaceNil ¶
func (cneps *CurrentNetworkEpochProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
type DataPackerStub ¶
type DataPackerStub struct {
PackDataInChunksCalled func(data [][]byte, limit int) ([][]byte, error)
}
DataPackerStub -
func (*DataPackerStub) IsInterfaceNil ¶
func (dps *DataPackerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*DataPackerStub) PackDataInChunks ¶
func (dps *DataPackerStub) PackDataInChunks(data [][]byte, limit int) ([][]byte, error)
PackDataInChunks -
type DebugHandler ¶
type DebugHandler struct { LogRequestedDataCalled func(topic string, hash [][]byte, numReqIntra int, numReqCross int) LogFailedToResolveDataCalled func(topic string, hash []byte, err error) LogSucceededToResolveDataCalled func(topic string, hash []byte) EnabledCalled func() bool }
DebugHandler -
func (*DebugHandler) IsInterfaceNil ¶
func (dh *DebugHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*DebugHandler) LogFailedToResolveData ¶
func (dh *DebugHandler) LogFailedToResolveData(topic string, hash []byte, err error)
LogFailedToResolveData -
func (*DebugHandler) LogRequestedData ¶
func (dh *DebugHandler) LogRequestedData(topic string, hashes [][]byte, numReqIntra int, numReqCross int)
LogRequestedData -
func (*DebugHandler) LogSucceededToResolveData ¶
func (dh *DebugHandler) LogSucceededToResolveData(topic string, hash []byte)
LogSucceededToResolveData -
type EpochHandlerStub ¶
type EpochHandlerStub struct {
MetaEpochCalled func() uint32
}
EpochHandlerStub -
func (*EpochHandlerStub) IsInterfaceNil ¶
func (ehs *EpochHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type HasherStub ¶
HasherStub -
func (HasherStub) IsInterfaceNil ¶
func (hash HasherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HeaderRequesterStub ¶
type HeaderRequesterStub struct { RequestDataFromHashCalled func(hash []byte, epoch uint32) error SetNumPeersToQueryCalled func(intra int, cross int) NumPeersToQueryCalled func() (int, int) SetDebugHandlerCalled func(handler dataRetriever.DebugHandler) error SetEpochHandlerCalled func(epochHandler dataRetriever.EpochHandler) error }
HeaderRequesterStub -
func (*HeaderRequesterStub) IsInterfaceNil ¶
func (stub *HeaderRequesterStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderRequesterStub) NumPeersToQuery ¶
func (stub *HeaderRequesterStub) NumPeersToQuery() (int, int)
NumPeersToQuery -
func (*HeaderRequesterStub) RequestDataFromHash ¶
func (stub *HeaderRequesterStub) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
func (*HeaderRequesterStub) SetDebugHandler ¶
func (stub *HeaderRequesterStub) SetDebugHandler(handler dataRetriever.DebugHandler) error
SetDebugHandler -
func (*HeaderRequesterStub) SetEpochHandler ¶
func (stub *HeaderRequesterStub) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
SetEpochHandler -
func (*HeaderRequesterStub) SetNumPeersToQuery ¶
func (stub *HeaderRequesterStub) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery -
type HeaderResolverStub ¶
type HeaderResolverStub struct { ProcessReceivedMessageCalled func(message p2p.MessageP2P) error SetEpochHandlerCalled func(epochHandler dataRetriever.EpochHandler) error SetDebugHandlerCalled func(handler dataRetriever.DebugHandler) error CloseCalled func() error }
HeaderResolverStub -
func (*HeaderResolverStub) Close ¶
func (hrs *HeaderResolverStub) Close() error
func (*HeaderResolverStub) IsInterfaceNil ¶
func (hrs *HeaderResolverStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HeaderResolverStub) ProcessReceivedMessage ¶
func (hrs *HeaderResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID, _ p2p.MessageHandler) error
ProcessReceivedMessage -
func (*HeaderResolverStub) SetDebugHandler ¶
func (hrs *HeaderResolverStub) SetDebugHandler(handler dataRetriever.DebugHandler) error
SetDebugHandler -
func (*HeaderResolverStub) SetEpochHandler ¶
func (hrs *HeaderResolverStub) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
SetEpochHandler -
type HeadersCacherStub ¶
type HeadersCacherStub 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 }
HeadersCacherStub -
func (*HeadersCacherStub) AddHeader ¶
func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
AddHeader -
func (*HeadersCacherStub) GetHeaderByHash ¶
func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
GetHeaderByHash -
func (*HeadersCacherStub) GetHeadersByNonceAndShardId ¶
func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
GetHeadersByNonceAndShardId -
func (*HeadersCacherStub) GetNumHeaders ¶
func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
GetNumHeaders -
func (*HeadersCacherStub) IsInterfaceNil ¶
func (hcs *HeadersCacherStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeadersCacherStub) Nonces ¶
func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
Nonces -
func (*HeadersCacherStub) RegisterHandler ¶
func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
RegisterHandler -
func (*HeadersCacherStub) RemoveHeaderByHash ¶
func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
RemoveHeaderByHash -
func (*HeadersCacherStub) RemoveHeaderByNonceAndShardId ¶
func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
RemoveHeaderByNonceAndShardId -
type IntRandomizerStub ¶
IntRandomizerStub -
func (*IntRandomizerStub) IsInterfaceNil ¶
func (irs *IntRandomizerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type ManualEpochStartNotifierStub ¶
type ManualEpochStartNotifierStub struct { NewEpochCalled func(epoch uint32) CurrentEpochCalled func() uint32 }
ManualEpochStartNotifierStub -
func (*ManualEpochStartNotifierStub) CurrentEpoch ¶
func (mesns *ManualEpochStartNotifierStub) CurrentEpoch() uint32
CurrentEpoch -
func (*ManualEpochStartNotifierStub) IsInterfaceNil ¶
func (mesns *ManualEpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ManualEpochStartNotifierStub) NewEpoch ¶
func (mesns *ManualEpochStartNotifierStub) NewEpoch(epoch uint32)
NewEpoch -
type MarshalizerMock ¶
type MarshalizerMock struct {
Fail bool
}
MarshalizerMock that will be used for testing
func (*MarshalizerMock) IsInterfaceNil ¶
func (mm *MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerMock) Marshal ¶
func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerMock) Unmarshal ¶
func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MarshalizerStub ¶
type MarshalizerStub struct { MarshalCalled func(obj interface{}) ([]byte, error) UnmarshalCalled func(obj interface{}, buff []byte) error }
MarshalizerStub -
func (*MarshalizerStub) IsInterfaceNil ¶
func (ms *MarshalizerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerStub) Marshal ¶
func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (*MarshalizerStub) Unmarshal ¶
func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type MessageHandlerStub ¶
type MessageHandlerStub struct { ConnectedPeersOnTopicCalled func(topic string) []core.PeerID SendToConnectedPeerCalled func(topic string, buff []byte, peerID core.PeerID) error IDCalled func() core.PeerID ConnectedPeersCalled func() []core.PeerID IsConnectedCalled func(peerID core.PeerID) bool }
MessageHandlerStub -
func (*MessageHandlerStub) ConnectedPeers ¶
func (mhs *MessageHandlerStub) ConnectedPeers() []core.PeerID
ConnectedPeers -
func (*MessageHandlerStub) ConnectedPeersOnTopic ¶
func (mhs *MessageHandlerStub) ConnectedPeersOnTopic(topic string) []core.PeerID
ConnectedPeersOnTopic -
func (*MessageHandlerStub) IsConnected ¶
func (mhs *MessageHandlerStub) IsConnected(peerID core.PeerID) bool
IsConnected -
func (*MessageHandlerStub) IsInterfaceNil ¶
func (mhs *MessageHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MessageHandlerStub) SendToConnectedPeer ¶
func (mhs *MessageHandlerStub) SendToConnectedPeer(topic string, buff []byte, peerID core.PeerID) error
SendToConnectedPeer -
type P2PAntifloodHandlerStub ¶
type P2PAntifloodHandlerStub struct { CanProcessMessageCalled func(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error CanProcessMessagesOnTopicCalled func(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error BlacklistPeerCalled func(peer core.PeerID, reason string, duration time.Duration) }
P2PAntifloodHandlerStub -
func (*P2PAntifloodHandlerStub) BlacklistPeer ¶
func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
BlacklistPeer -
func (*P2PAntifloodHandlerStub) CanProcessMessage ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
CanProcessMessage -
func (*P2PAntifloodHandlerStub) CanProcessMessagesOnTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error
CanProcessMessagesOnTopic -
func (*P2PAntifloodHandlerStub) IsInterfaceNil ¶
func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type PeerListCreatorStub ¶
type PeerListCreatorStub struct { CrossShardPeerListCalled func() []core.PeerID IntraShardPeerListCalled func() []core.PeerID }
PeerListCreatorStub -
func (*PeerListCreatorStub) CrossShardPeerList ¶
func (p *PeerListCreatorStub) CrossShardPeerList() []core.PeerID
CrossShardPeerList -
func (*PeerListCreatorStub) IntraShardPeerList ¶
func (p *PeerListCreatorStub) IntraShardPeerList() []core.PeerID
IntraShardPeerList -
func (*PeerListCreatorStub) IsInterfaceNil ¶
func (p *PeerListCreatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type RequestedItemsHandlerStub ¶
type RequestedItemsHandlerStub struct { AddCalled func(key string) error HasCalled func(key string) bool SweepCalled func() }
RequestedItemsHandlerStub -
func (*RequestedItemsHandlerStub) Add ¶
func (rihs *RequestedItemsHandlerStub) Add(key string) error
Add -
func (*RequestedItemsHandlerStub) Has ¶
func (rihs *RequestedItemsHandlerStub) Has(key string) bool
Has -
func (*RequestedItemsHandlerStub) IsInterfaceNil ¶
func (rihs *RequestedItemsHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ResolverStub ¶
type ResolverStub struct { ProcessReceivedMessageCalled func(message p2p.MessageP2P) error SetDebugHandlerCalled func(handler dataRetriever.DebugHandler) error CloseCalled func() error }
ResolverStub -
func (*ResolverStub) IsInterfaceNil ¶
func (rs *ResolverStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ResolverStub) ProcessReceivedMessage ¶
func (rs *ResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID, _ p2p.MessageHandler) error
ProcessReceivedMessage -
func (*ResolverStub) SetDebugHandler ¶
func (rs *ResolverStub) SetDebugHandler(handler dataRetriever.DebugHandler) error
SetDebugHandler -
type ThrottlerStub ¶
type ThrottlerStub struct { CanProcessCalled func() bool StartProcessingCalled func() EndProcessingCalled func() // contains filtered or unexported fields }
ThrottlerStub -
func (*ThrottlerStub) IsInterfaceNil ¶
func (ts *ThrottlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ThrottlerStub) StartProcessing ¶
func (ts *ThrottlerStub) StartProcessing()
StartProcessing -
func (*ThrottlerStub) StartWasCalled ¶
func (ts *ThrottlerStub) StartWasCalled() bool
StartWasCalled -
type TopicResolverSenderStub ¶
type TopicResolverSenderStub struct { SendCalled func(buff []byte, peer core.PeerID, source p2p.MessageHandler) error TargetShardIDCalled func() uint32 // contains filtered or unexported fields }
TopicResolverSenderStub -
func (*TopicResolverSenderStub) DebugHandler ¶
func (trss *TopicResolverSenderStub) DebugHandler() dataRetriever.DebugHandler
DebugHandler -
func (*TopicResolverSenderStub) IsInterfaceNil ¶
func (trss *TopicResolverSenderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TopicResolverSenderStub) RequestTopic ¶
func (trss *TopicResolverSenderStub) RequestTopic() string
RequestTopic -
func (*TopicResolverSenderStub) Send ¶
func (trss *TopicResolverSenderStub) Send(buff []byte, peer core.PeerID, source p2p.MessageHandler) error
Send -
func (*TopicResolverSenderStub) SetDebugHandler ¶
func (trss *TopicResolverSenderStub) SetDebugHandler(handler dataRetriever.DebugHandler) error
SetDebugHandler -
func (*TopicResolverSenderStub) TargetShardID ¶
func (trss *TopicResolverSenderStub) TargetShardID() uint32
TargetShardID -
type TxForCurrentBlockStub ¶
type TxForCurrentBlockStub struct { CleanCalled func() GetTxCalled func(txHash []byte) (data.TransactionHandler, error) AddTxCalled func(txHash []byte, tx data.TransactionHandler) }
TxForCurrentBlockStub -
func (*TxForCurrentBlockStub) AddTx ¶
func (t *TxForCurrentBlockStub) AddTx(txHash []byte, tx data.TransactionHandler)
AddTx -
func (*TxForCurrentBlockStub) GetTx ¶
func (t *TxForCurrentBlockStub) GetTx(txHash []byte) (data.TransactionHandler, error)
GetTx -
func (*TxForCurrentBlockStub) IsInterfaceNil ¶
func (t *TxForCurrentBlockStub) IsInterfaceNil() bool
IsInterfaceNil -
type Uint64ByteSliceConverterMock ¶
type Uint64ByteSliceConverterMock struct { ToByteSliceCalled func(uint64) []byte ToUint64Called func([]byte) (uint64, error) }
Uint64ByteSliceConverterMock converts byte slice to/from uint64
func (*Uint64ByteSliceConverterMock) IsInterfaceNil ¶
func (u *Uint64ByteSliceConverterMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*Uint64ByteSliceConverterMock) ToByteSlice ¶
func (u *Uint64ByteSliceConverterMock) ToByteSlice(p uint64) []byte
ToByteSlice is a mock implementation for Uint64ByteSliceConverter
type ValidatorInfoForCurrentEpochStub ¶
type ValidatorInfoForCurrentEpochStub struct { CleanCalled func() GetValidatorInfoCalled func(validatorInfoHash []byte) (*state.ShardValidatorInfo, error) AddValidatorInfoCalled func(validatorInfoHash []byte, validatorInfo *state.ShardValidatorInfo) }
ValidatorInfoForCurrentEpochStub -
func (*ValidatorInfoForCurrentEpochStub) AddValidatorInfo ¶
func (v *ValidatorInfoForCurrentEpochStub) AddValidatorInfo(validatorInfoHash []byte, validatorInfo *state.ShardValidatorInfo)
AddValidatorInfo -
func (*ValidatorInfoForCurrentEpochStub) Clean ¶
func (v *ValidatorInfoForCurrentEpochStub) Clean()
Clean -
func (*ValidatorInfoForCurrentEpochStub) GetValidatorInfo ¶
func (v *ValidatorInfoForCurrentEpochStub) GetValidatorInfo(validatorInfoHash []byte) (*state.ShardValidatorInfo, error)
GetValidatorInfo -
func (*ValidatorInfoForCurrentEpochStub) IsInterfaceNil ¶
func (v *ValidatorInfoForCurrentEpochStub) IsInterfaceNil() bool
IsInterfaceNil -
type WhiteListHandlerStub ¶
WhiteListHandlerStub -
func (*WhiteListHandlerStub) IsInterfaceNil ¶
func (w *WhiteListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
Source Files ¶
- coordinatorStub.go
- currentNetworkEpochProviderStub.go
- dataPackerStub.go
- debugHandlerStub.go
- epochHandlerStub.go
- hasherStub.go
- headerRequesterStub.go
- headerResolverStub.go
- headersCacherStub.go
- intRandomizerStub.go
- manualEpochStartNotifierStub.go
- marshalizerMock.go
- marshalizerStub.go
- messageHandlerStub.go
- multipleShardsCoordinatorMock.go
- nonceHashConverterMock.go
- oneShardCoordinatorMock.go
- p2pAntifloodHandlerStub.go
- peerListCreatorStub.go
- requestedItemsHandlerStub.go
- resolverStub.go
- throttlerStub.go
- topicResolverSenderStub.go
- txForCurrentBlockMock.go
- uint64ByteSliceConverterMock.go
- validatorInfoForCurrentEpochStub.go
- whiteListHandlerStub.go