Documentation ¶
Index ¶
- func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
- func NewNonceHashConverterMock() *nonceHashConverterMock
- func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
- func NewTopicMessageHandlerStub() *topicMessageHandlerStub
- type ChainStorerMock
- func (bc *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (bc *ChainStorerMock) CloseAll() error
- func (bc *ChainStorerMock) Destroy() error
- func (bc *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (bc *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (bc *ChainStorerMock) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
- func (bc *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (bc *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
- func (bc *ChainStorerMock) IsInterfaceNil() bool
- func (bc *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- func (bc *ChainStorerMock) SetEpochForPutOperation(_ uint32)
- type ChunkResolverStub
- 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 EpochHandlerStub
- type HashSliceResolverStub
- func (hsrs *HashSliceResolverStub) Close() error
- func (hsrs *HashSliceResolverStub) IsInterfaceNil() bool
- func (hsrs *HashSliceResolverStub) NumPeersToQuery() (int, int)
- func (hsrs *HashSliceResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
- func (hsrs *HashSliceResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
- func (hsrs *HashSliceResolverStub) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
- func (hsrs *HashSliceResolverStub) SetNumPeersToQuery(intra int, cross int)
- func (hsrs *HashSliceResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
- type HasherStub
- type HeaderResolverStub
- func (hrs *HeaderResolverStub) Close() error
- func (hrs *HeaderResolverStub) IsInterfaceNil() bool
- func (hrs *HeaderResolverStub) NumPeersToQuery() (int, int)
- func (hrs *HeaderResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
- func (hrs *HeaderResolverStub) RequestDataFromEpoch(identifier []byte) error
- func (hrs *HeaderResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
- func (hrs *HeaderResolverStub) RequestDataFromNonce(nonce uint64, epoch uint32) error
- func (hrs *HeaderResolverStub) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
- func (hrs *HeaderResolverStub) SetNumPeersToQuery(intra int, cross int)
- func (hrs *HeaderResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) 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) ConnectedFullHistoryPeersOnTopic(topic string) []core.PeerID
- func (mhs *MessageHandlerStub) ConnectedPeersOnTopic(topic string) []core.PeerID
- func (mhs *MessageHandlerStub) ID() core.PeerID
- func (mhs *MessageHandlerStub) IsInterfaceNil() bool
- func (mhs *MessageHandlerStub) SendToConnectedPeer(topic string, buff []byte, peerID core.PeerID) error
- type MessengerStub
- func (ms *MessengerStub) Addresses() []string
- func (ms *MessengerStub) Bootstrap() error
- func (ms *MessengerStub) Broadcast(topic string, buff []byte)
- func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte)
- func (ms *MessengerStub) Close() error
- func (ms *MessengerStub) ConnectToPeer(address string) error
- func (ms *MessengerStub) ConnectedFullHistoryPeersOnTopic(topic string) []core.PeerID
- func (ms *MessengerStub) ConnectedPeers() []core.PeerID
- func (ms *MessengerStub) ConnectedPeersOnTopic(topic string) []core.PeerID
- func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error
- func (ms *MessengerStub) HasTopic(name string) bool
- func (ms *MessengerStub) HasTopicValidator(name string) bool
- func (ms *MessengerStub) ID() core.PeerID
- func (ms *MessengerStub) IsConnected(peerID core.PeerID) bool
- func (ms *MessengerStub) IsInterfaceNil() bool
- func (ms *MessengerStub) OutgoingChannelLoadBalancer() p2p.ChannelLoadBalancer
- func (ms *MessengerStub) Peers() []core.PeerID
- func (ms *MessengerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
- func (ms *MessengerStub) SendToConnectedPeer(topic string, buff []byte, peerID core.PeerID) error
- func (ms *MessengerStub) TrimConnections()
- func (ms *MessengerStub) UnjoinAllTopics() error
- func (ms *MessengerStub) UnregisterAllMessageProcessors() error
- func (ms *MessengerStub) UnregisterMessageProcessor(topic string, identifier string) 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 P2PMessageMock
- func (msg *P2PMessageMock) Data() []byte
- func (msg *P2PMessageMock) From() []byte
- func (msg *P2PMessageMock) IsInterfaceNil() bool
- func (msg *P2PMessageMock) Key() []byte
- func (msg *P2PMessageMock) Payload() []byte
- func (msg *P2PMessageMock) Peer() core.PeerID
- func (msg *P2PMessageMock) SeqNo() []byte
- func (msg *P2PMessageMock) Signature() []byte
- func (msg *P2PMessageMock) Timestamp() int64
- func (msg *P2PMessageMock) Topic() string
- type PeerListCreatorStub
- type RequestedItemsHandlerStub
- type ResolverDebugHandler
- func (rdh *ResolverDebugHandler) IsInterfaceNil() bool
- func (rdh *ResolverDebugHandler) LogFailedToResolveData(topic string, hash []byte, err error)
- func (rdh *ResolverDebugHandler) LogRequestedData(topic string, hashes [][]byte, numReqIntra int, numReqCross int)
- func (rdh *ResolverDebugHandler) LogSucceededToResolveData(topic string, hash []byte)
- type ResolverStub
- func (rs *ResolverStub) Close() error
- func (rs *ResolverStub) IsInterfaceNil() bool
- func (rs *ResolverStub) NumPeersToQuery() (int, int)
- func (rs *ResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
- func (rs *ResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
- func (rs *ResolverStub) SetNumPeersToQuery(intra int, cross int)
- func (rs *ResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
- type ResolversContainerStub
- func (rcs *ResolversContainerStub) Add(key string, val dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) Close() error
- func (rcs *ResolversContainerStub) Get(key string) (dataRetriever.Resolver, error)
- func (rcs *ResolversContainerStub) IsInterfaceNil() bool
- func (rcs *ResolversContainerStub) Iterate(handler func(key string, resolver dataRetriever.Resolver) bool)
- func (rcs *ResolversContainerStub) Len() int
- func (rcs *ResolversContainerStub) Remove(key string)
- func (rcs *ResolversContainerStub) Replace(key string, val dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) ResolverKeys() string
- type ResolversFinderStub
- func (rfs *ResolversFinderStub) CrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) IntraShardResolver(baseTopic string) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) MetaChainResolver(baseTopic string) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) MetaCrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
- type ThrottlerStub
- type TopicHandlerStub
- func (ths *TopicHandlerStub) CreateTopic(name string, createChannelForTopic bool) error
- func (ths *TopicHandlerStub) HasTopic(name string) bool
- func (ths *TopicHandlerStub) IsInterfaceNil() bool
- func (ths *TopicHandlerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
- type TopicResolverSenderStub
- func (trss *TopicResolverSenderStub) IsInterfaceNil() bool
- func (trss *TopicResolverSenderStub) NumPeersToQuery() (int, int)
- func (trss *TopicResolverSenderStub) RequestTopic() string
- func (trss *TopicResolverSenderStub) ResolverDebugHandler() dataRetriever.ResolverDebugHandler
- func (trss *TopicResolverSenderStub) Send(buff []byte, peer core.PeerID) error
- func (trss *TopicResolverSenderStub) SendOnRequestTopic(rd *dataRetriever.RequestData, originalHashes [][]byte) error
- func (trss *TopicResolverSenderStub) SetNumPeersToQuery(intra int, cross int)
- func (trss *TopicResolverSenderStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
- func (trss *TopicResolverSenderStub) TargetShardID() uint32
- type TxForCurrentBlockStub
- type Uint64ByteSliceConverterMock
- 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 -
func NewTopicMessageHandlerStub ¶
func NewTopicMessageHandlerStub() *topicMessageHandlerStub
NewTopicMessageHandlerStub -
Types ¶
type ChainStorerMock ¶
type ChainStorerMock struct { AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer) GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer HasCalled func(unitType dataRetriever.UnitType, key []byte) error GetCalled func(unitType dataRetriever.UnitType, key []byte) ([]byte, error) PutCalled func(unitType dataRetriever.UnitType, key []byte, value []byte) error GetAllCalled func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error) GetAllStorersCalled func() map[dataRetriever.UnitType]storage.Storer DestroyCalled func() error CloseAllCalled func() error }
ChainStorerMock is a mock implementation of the ChainStorer interface
func (*ChainStorerMock) AddStorer ¶
func (bc *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer will add a new storer to the chain map
func (*ChainStorerMock) Destroy ¶
func (bc *ChainStorerMock) Destroy() error
Destroy removes the underlying files/resources used by the storage service
func (*ChainStorerMock) Get ¶
func (bc *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
Get returns the value for the given key if found in the selected storage unit, nil otherwise. It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) GetAll ¶
func (bc *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll gets all the elements with keys in the keys array, from the selected storage unit It can report an error if the provided unit type is not supported, if there is a missing key in the unit, or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) GetAllStorers ¶ added in v1.2.4
func (bc *ChainStorerMock) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
GetAllStorers -
func (*ChainStorerMock) GetStorer ¶
func (bc *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
GetStorer returns the storer from the chain map or nil if the storer was not found
func (*ChainStorerMock) Has ¶
func (bc *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
Has returns true if the key is found in the selected Unit or false otherwise It can return an error if the provided unit type is not supported or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) IsInterfaceNil ¶
func (bc *ChainStorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainStorerMock) Put ¶
func (bc *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
Put stores the key, value pair in the selected storage unit It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) SetEpochForPutOperation ¶ added in v1.0.109
func (bc *ChainStorerMock) SetEpochForPutOperation(_ uint32)
SetEpochForPutOperation won't do anything
type ChunkResolverStub ¶ added in v1.2.4
type ChunkResolverStub struct { HashSliceResolverStub RequestDataFromReferenceAndChunkCalled func(hash []byte, chunkIndex uint32) error }
ChunkResolverStub -
func (*ChunkResolverStub) RequestDataFromReferenceAndChunk ¶ added in v1.2.4
func (crs *ChunkResolverStub) RequestDataFromReferenceAndChunk(hash []byte, chunkIndex uint32) error
RequestDataFromReferenceAndChunk -
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 ¶ added in v1.2.0
type CurrentNetworkEpochProviderStub struct { EpochIsActiveInNetworkCalled func(epoch uint32) bool EpochConfirmedCalled func(newEpoch uint32, newTimestamp uint64) }
CurrentNetworkEpochProviderStub -
func (*CurrentNetworkEpochProviderStub) EpochConfirmed ¶ added in v1.2.0
func (cneps *CurrentNetworkEpochProviderStub) EpochConfirmed(newEpoch uint32, newTimestamp uint64)
EpochConfirmed -
func (*CurrentNetworkEpochProviderStub) EpochIsActiveInNetwork ¶ added in v1.2.0
func (cneps *CurrentNetworkEpochProviderStub) EpochIsActiveInNetwork(epoch uint32) bool
EpochIsActiveInNetwork -
func (*CurrentNetworkEpochProviderStub) IsInterfaceNil ¶ added in v1.2.0
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 EpochHandlerStub ¶
type EpochHandlerStub struct {
MetaEpochCalled func() uint32
}
EpochHandlerStub -
func (*EpochHandlerStub) IsInterfaceNil ¶
func (ehs *EpochHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochHandlerStub) MetaEpoch ¶ added in v1.0.114
func (ehs *EpochHandlerStub) MetaEpoch() uint32
MetaEpoch -
type HashSliceResolverStub ¶
type HashSliceResolverStub struct { RequestDataFromHashCalled func(hash []byte, epoch uint32) error ProcessReceivedMessageCalled func(message p2p.MessageP2P) error RequestDataFromHashArrayCalled func(hashes [][]byte, epoch uint32) error SetNumPeersToQueryCalled func(intra int, cross int) NumPeersToQueryCalled func() (int, int) SetResolverDebugHandlerCalled func(handler dataRetriever.ResolverDebugHandler) error CloseCalled func() error }
HashSliceResolverStub -
func (*HashSliceResolverStub) Close ¶ added in v1.2.0
func (hsrs *HashSliceResolverStub) Close() error
Close -
func (*HashSliceResolverStub) IsInterfaceNil ¶
func (hsrs *HashSliceResolverStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HashSliceResolverStub) NumPeersToQuery ¶ added in v1.0.110
func (hsrs *HashSliceResolverStub) NumPeersToQuery() (int, int)
NumPeersToQuery -
func (*HashSliceResolverStub) ProcessReceivedMessage ¶
func (hsrs *HashSliceResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
ProcessReceivedMessage -
func (*HashSliceResolverStub) RequestDataFromHash ¶
func (hsrs *HashSliceResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
func (*HashSliceResolverStub) RequestDataFromHashArray ¶
func (hsrs *HashSliceResolverStub) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
RequestDataFromHashArray -
func (*HashSliceResolverStub) SetNumPeersToQuery ¶ added in v1.0.102
func (hsrs *HashSliceResolverStub) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery -
func (*HashSliceResolverStub) SetResolverDebugHandler ¶ added in v1.0.110
func (hsrs *HashSliceResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler -
type HasherStub ¶
HasherStub -
func (*HasherStub) IsInterfaceNil ¶
func (hash *HasherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HeaderResolverStub ¶
type HeaderResolverStub struct { RequestDataFromHashCalled func(hash []byte, epoch uint32) error ProcessReceivedMessageCalled func(message p2p.MessageP2P) error RequestDataFromNonceCalled func(nonce uint64, epoch uint32) error RequestDataFromEpochCalled func(identifier []byte) error SetEpochHandlerCalled func(epochHandler dataRetriever.EpochHandler) error SetNumPeersToQueryCalled func(intra int, cross int) NumPeersToQueryCalled func() (int, int) SetResolverDebugHandlerCalled func(handler dataRetriever.ResolverDebugHandler) error CloseCalled func() error }
HeaderResolverStub -
func (*HeaderResolverStub) Close ¶ added in v1.2.0
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) NumPeersToQuery ¶ added in v1.0.110
func (hrs *HeaderResolverStub) NumPeersToQuery() (int, int)
NumPeersToQuery -
func (*HeaderResolverStub) ProcessReceivedMessage ¶
func (hrs *HeaderResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
ProcessReceivedMessage -
func (*HeaderResolverStub) RequestDataFromEpoch ¶
func (hrs *HeaderResolverStub) RequestDataFromEpoch(identifier []byte) error
RequestDataFromEpoch -
func (*HeaderResolverStub) RequestDataFromHash ¶
func (hrs *HeaderResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
func (*HeaderResolverStub) RequestDataFromNonce ¶
func (hrs *HeaderResolverStub) RequestDataFromNonce(nonce uint64, epoch uint32) error
RequestDataFromNonce -
func (*HeaderResolverStub) SetEpochHandler ¶
func (hrs *HeaderResolverStub) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
SetEpochHandler -
func (*HeaderResolverStub) SetNumPeersToQuery ¶ added in v1.0.102
func (hrs *HeaderResolverStub) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery -
func (*HeaderResolverStub) SetResolverDebugHandler ¶ added in v1.0.110
func (hrs *HeaderResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler -
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 ¶ added in v1.1.1
type ManualEpochStartNotifierStub struct { NewEpochCalled func(epoch uint32) CurrentEpochCalled func() uint32 }
ManualEpochStartNotifierStub -
func (*ManualEpochStartNotifierStub) CurrentEpoch ¶ added in v1.1.1
func (mesns *ManualEpochStartNotifierStub) CurrentEpoch() uint32
CurrentEpoch -
func (*ManualEpochStartNotifierStub) IsInterfaceNil ¶ added in v1.1.1
func (mesns *ManualEpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ManualEpochStartNotifierStub) NewEpoch ¶ added in v1.1.1
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 ConnectedFullHistoryPeersOnTopicCalled func(topic string) []core.PeerID SendToConnectedPeerCalled func(topic string, buff []byte, peerID core.PeerID) error IDCalled func() core.PeerID }
MessageHandlerStub -
func (*MessageHandlerStub) ConnectedFullHistoryPeersOnTopic ¶ added in v1.2.0
func (mhs *MessageHandlerStub) ConnectedFullHistoryPeersOnTopic(topic string) []core.PeerID
ConnectedFullHistoryPeersOnTopic -
func (*MessageHandlerStub) ConnectedPeersOnTopic ¶
func (mhs *MessageHandlerStub) ConnectedPeersOnTopic(topic string) []core.PeerID
ConnectedPeersOnTopic -
func (*MessageHandlerStub) ID ¶ added in v1.1.1
func (mhs *MessageHandlerStub) ID() core.PeerID
ID -
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 MessengerStub ¶
type MessengerStub struct { ConnectedPeersOnTopicCalled func(topic string) []core.PeerID ConnectedFullHistoryPeersOnTopicCalled func(topic string) []core.PeerID CloseCalled func() error IDCalled func() core.PeerID PeersCalled func() []core.PeerID AddressesCalled func() []string ConnectToPeerCalled func(address string) error TrimConnectionsCalled func() IsConnectedCalled func(peerID core.PeerID) bool ConnectedPeersCalled func() []core.PeerID CreateTopicCalled func(name string, createChannelForTopic bool) error HasTopicCalled func(name string) bool HasTopicValidatorCalled func(name string) bool BroadcastOnChannelCalled func(channel string, topic string, buff []byte) BroadcastCalled func(topic string, buff []byte) RegisterMessageProcessorCalled func(topic string, identifier string, handler p2p.MessageProcessor) error UnregisterMessageProcessorCalled func(topic string, identifier string) error SendToConnectedPeerCalled func(topic string, buff []byte, peerID core.PeerID) error OutgoingChannelLoadBalancerCalled func() p2p.ChannelLoadBalancer BootstrapCalled func() error }
MessengerStub -
func (*MessengerStub) Broadcast ¶
func (ms *MessengerStub) Broadcast(topic string, buff []byte)
Broadcast -
func (*MessengerStub) BroadcastOnChannel ¶
func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte)
BroadcastOnChannel -
func (*MessengerStub) ConnectToPeer ¶
func (ms *MessengerStub) ConnectToPeer(address string) error
ConnectToPeer -
func (*MessengerStub) ConnectedFullHistoryPeersOnTopic ¶ added in v1.2.0
func (ms *MessengerStub) ConnectedFullHistoryPeersOnTopic(topic string) []core.PeerID
ConnectedFullHistoryPeersOnTopic -
func (*MessengerStub) ConnectedPeers ¶
func (ms *MessengerStub) ConnectedPeers() []core.PeerID
ConnectedPeers -
func (*MessengerStub) ConnectedPeersOnTopic ¶ added in v1.1.1
func (ms *MessengerStub) ConnectedPeersOnTopic(topic string) []core.PeerID
ConnectedPeersOnTopic -
func (*MessengerStub) CreateTopic ¶
func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error
CreateTopic -
func (*MessengerStub) HasTopicValidator ¶
func (ms *MessengerStub) HasTopicValidator(name string) bool
HasTopicValidator -
func (*MessengerStub) IsConnected ¶
func (ms *MessengerStub) IsConnected(peerID core.PeerID) bool
IsConnected -
func (*MessengerStub) IsInterfaceNil ¶
func (ms *MessengerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MessengerStub) OutgoingChannelLoadBalancer ¶
func (ms *MessengerStub) OutgoingChannelLoadBalancer() p2p.ChannelLoadBalancer
OutgoingChannelLoadBalancer -
func (*MessengerStub) RegisterMessageProcessor ¶
func (ms *MessengerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
RegisterMessageProcessor -
func (*MessengerStub) SendToConnectedPeer ¶
SendToConnectedPeer -
func (*MessengerStub) TrimConnections ¶
func (ms *MessengerStub) TrimConnections()
TrimConnections -
func (*MessengerStub) UnjoinAllTopics ¶ added in v1.2.0
func (ms *MessengerStub) UnjoinAllTopics() error
UnjoinAllTopics -
func (*MessengerStub) UnregisterAllMessageProcessors ¶ added in v1.2.0
func (ms *MessengerStub) UnregisterAllMessageProcessors() error
UnregisterAllMessageProcessors -
func (*MessengerStub) UnregisterMessageProcessor ¶
func (ms *MessengerStub) UnregisterMessageProcessor(topic string, identifier string) error
UnregisterMessageProcessor -
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 ¶ added in v1.0.132
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 ¶ added in v1.0.106
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 P2PMessageMock ¶
type P2PMessageMock struct { FromField []byte DataField []byte SeqNoField []byte TopicField string SignatureField []byte KeyField []byte PeerField core.PeerID PayloadField []byte TimestampField int64 }
P2PMessageMock -
func (*P2PMessageMock) IsInterfaceNil ¶
func (msg *P2PMessageMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*P2PMessageMock) Payload ¶ added in v1.0.133
func (msg *P2PMessageMock) Payload() []byte
Payload -
func (*P2PMessageMock) Timestamp ¶ added in v1.0.133
func (msg *P2PMessageMock) Timestamp() int64
Timestamp -
type PeerListCreatorStub ¶
type PeerListCreatorStub struct { CrossShardPeerListCalled func() []core.PeerID IntraShardPeerListCalled func() []core.PeerID FullHistoryListCalled func() []core.PeerID }
PeerListCreatorStub -
func (*PeerListCreatorStub) CrossShardPeerList ¶ added in v1.2.3
func (p *PeerListCreatorStub) CrossShardPeerList() []core.PeerID
CrossShardPeerList -
func (*PeerListCreatorStub) FullHistoryList ¶ added in v1.2.0
func (p *PeerListCreatorStub) FullHistoryList() []core.PeerID
FullHistoryList -
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 ResolverDebugHandler ¶ added in v1.0.110
type ResolverDebugHandler 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 }
ResolverDebugHandler -
func (*ResolverDebugHandler) IsInterfaceNil ¶ added in v1.0.110
func (rdh *ResolverDebugHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*ResolverDebugHandler) LogFailedToResolveData ¶ added in v1.0.110
func (rdh *ResolverDebugHandler) LogFailedToResolveData(topic string, hash []byte, err error)
LogFailedToResolveData -
func (*ResolverDebugHandler) LogRequestedData ¶ added in v1.0.110
func (rdh *ResolverDebugHandler) LogRequestedData(topic string, hashes [][]byte, numReqIntra int, numReqCross int)
LogRequestedData -
func (*ResolverDebugHandler) LogSucceededToResolveData ¶ added in v1.0.111
func (rdh *ResolverDebugHandler) LogSucceededToResolveData(topic string, hash []byte)
LogSucceededToResolveData -
type ResolverStub ¶
type ResolverStub struct { RequestDataFromHashCalled func(hash []byte, epoch uint32) error ProcessReceivedMessageCalled func(message p2p.MessageP2P) error SetNumPeersToQueryCalled func(intra int, cross int) NumPeersToQueryCalled func() (int, int) SetResolverDebugHandlerCalled func(handler dataRetriever.ResolverDebugHandler) 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) NumPeersToQuery ¶ added in v1.0.110
func (rs *ResolverStub) NumPeersToQuery() (int, int)
NumPeersToQuery -
func (*ResolverStub) ProcessReceivedMessage ¶
func (rs *ResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
ProcessReceivedMessage -
func (*ResolverStub) RequestDataFromHash ¶
func (rs *ResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
func (*ResolverStub) SetNumPeersToQuery ¶ added in v1.0.102
func (rs *ResolverStub) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery -
func (*ResolverStub) SetResolverDebugHandler ¶ added in v1.0.110
func (rs *ResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler -
type ResolversContainerStub ¶
type ResolversContainerStub struct { GetCalled func(key string) (dataRetriever.Resolver, error) AddCalled func(key string, val dataRetriever.Resolver) error ReplaceCalled func(key string, val dataRetriever.Resolver) error RemoveCalled func(key string) LenCalled func() int ResolverKeysCalled func() string IterateCalled func(handler func(key string, resolver dataRetriever.Resolver) bool) CloseCalled func() error }
ResolversContainerStub -
func (*ResolversContainerStub) Add ¶
func (rcs *ResolversContainerStub) Add(key string, val dataRetriever.Resolver) error
Add -
func (*ResolversContainerStub) AddMultiple ¶
func (rcs *ResolversContainerStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
AddMultiple -
func (*ResolversContainerStub) Close ¶ added in v1.2.0
func (rcs *ResolversContainerStub) Close() error
Close -
func (*ResolversContainerStub) Get ¶
func (rcs *ResolversContainerStub) Get(key string) (dataRetriever.Resolver, error)
Get -
func (*ResolversContainerStub) IsInterfaceNil ¶
func (rcs *ResolversContainerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ResolversContainerStub) Iterate ¶ added in v1.0.110
func (rcs *ResolversContainerStub) Iterate(handler func(key string, resolver dataRetriever.Resolver) bool)
Iterate -
func (*ResolversContainerStub) Remove ¶
func (rcs *ResolversContainerStub) Remove(key string)
Remove -
func (*ResolversContainerStub) Replace ¶
func (rcs *ResolversContainerStub) Replace(key string, val dataRetriever.Resolver) error
Replace -
func (*ResolversContainerStub) ResolverKeys ¶
func (rcs *ResolversContainerStub) ResolverKeys() string
ResolverKeys -
type ResolversFinderStub ¶
type ResolversFinderStub struct { ResolversContainerStub IntraShardResolverCalled func(baseTopic string) (dataRetriever.Resolver, error) MetaChainResolverCalled func(baseTopic string) (dataRetriever.Resolver, error) CrossShardResolverCalled func(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error) MetaCrossShardResolverCalled func(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error) }
ResolversFinderStub -
func (*ResolversFinderStub) CrossShardResolver ¶
func (rfs *ResolversFinderStub) CrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
CrossShardResolver -
func (*ResolversFinderStub) IntraShardResolver ¶
func (rfs *ResolversFinderStub) IntraShardResolver(baseTopic string) (dataRetriever.Resolver, error)
IntraShardResolver -
func (*ResolversFinderStub) MetaChainResolver ¶
func (rfs *ResolversFinderStub) MetaChainResolver(baseTopic string) (dataRetriever.Resolver, error)
MetaChainResolver -
func (*ResolversFinderStub) MetaCrossShardResolver ¶ added in v1.0.102
func (rfs *ResolversFinderStub) MetaCrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
MetaCrossShardResolver -
type ThrottlerStub ¶
type ThrottlerStub struct { CanProcessCalled func() bool StartProcessingCalled func() EndProcessingCalled func() StartWasCalled bool EndWasCalled bool }
ThrottlerStub -
func (*ThrottlerStub) IsInterfaceNil ¶
func (ts *ThrottlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ThrottlerStub) StartProcessing ¶
func (ts *ThrottlerStub) StartProcessing()
StartProcessing -
type TopicHandlerStub ¶
type TopicHandlerStub struct { HasTopicCalled func(name string) bool CreateTopicCalled func(name string, createChannelForTopic bool) error RegisterMessageProcessorCalled func(topic string, identifier string, handler p2p.MessageProcessor) error }
TopicHandlerStub -
func (*TopicHandlerStub) CreateTopic ¶
func (ths *TopicHandlerStub) CreateTopic(name string, createChannelForTopic bool) error
CreateTopic -
func (*TopicHandlerStub) HasTopic ¶
func (ths *TopicHandlerStub) HasTopic(name string) bool
HasTopic -
func (*TopicHandlerStub) IsInterfaceNil ¶
func (ths *TopicHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TopicHandlerStub) RegisterMessageProcessor ¶
func (ths *TopicHandlerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
RegisterMessageProcessor -
type TopicResolverSenderStub ¶
type TopicResolverSenderStub struct { SendOnRequestTopicCalled func(rd *dataRetriever.RequestData, originalHashes [][]byte) error SendCalled func(buff []byte, peer core.PeerID) error TargetShardIDCalled func() uint32 SetNumPeersToQueryCalled func(intra int, cross int) GetNumPeersToQueryCalled func() (int, int) // contains filtered or unexported fields }
TopicResolverSenderStub -
func (*TopicResolverSenderStub) IsInterfaceNil ¶
func (trss *TopicResolverSenderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TopicResolverSenderStub) NumPeersToQuery ¶ added in v1.0.110
func (trss *TopicResolverSenderStub) NumPeersToQuery() (int, int)
NumPeersToQuery -
func (*TopicResolverSenderStub) RequestTopic ¶
func (trss *TopicResolverSenderStub) RequestTopic() string
RequestTopic -
func (*TopicResolverSenderStub) ResolverDebugHandler ¶ added in v1.0.110
func (trss *TopicResolverSenderStub) ResolverDebugHandler() dataRetriever.ResolverDebugHandler
ResolverDebugHandler -
func (*TopicResolverSenderStub) Send ¶
func (trss *TopicResolverSenderStub) Send(buff []byte, peer core.PeerID) error
Send -
func (*TopicResolverSenderStub) SendOnRequestTopic ¶
func (trss *TopicResolverSenderStub) SendOnRequestTopic(rd *dataRetriever.RequestData, originalHashes [][]byte) error
SendOnRequestTopic -
func (*TopicResolverSenderStub) SetNumPeersToQuery ¶ added in v1.0.102
func (trss *TopicResolverSenderStub) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery -
func (*TopicResolverSenderStub) SetResolverDebugHandler ¶ added in v1.0.110
func (trss *TopicResolverSenderStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler -
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 WhiteListHandlerStub ¶ added in v1.0.102
WhiteListHandlerStub -
func (*WhiteListHandlerStub) Add ¶ added in v1.0.102
func (w *WhiteListHandlerStub) Add(keys [][]byte)
Add -
func (*WhiteListHandlerStub) IsInterfaceNil ¶ added in v1.0.102
func (w *WhiteListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*WhiteListHandlerStub) Remove ¶ added in v1.0.102
func (w *WhiteListHandlerStub) Remove(keys [][]byte)
Remove -
Source Files ¶
- chainStorerMock.go
- chunkResolverStub.go
- coordinatorStub.go
- currentNetworkEpochProviderStub.go
- dataPackerStub.go
- epochHandlerStub.go
- hashSliceResolverStub.go
- hasherStub.go
- headerResolverStub.go
- headersCacherStub.go
- intRandomizerStub.go
- manualEpochStartNotifierStub.go
- marshalizerMock.go
- marshalizerStub.go
- messageHandlerStub.go
- messengerStub.go
- multipleShardsCoordinatorMock.go
- nonceHashConverterMock.go
- oneShardCoordinatorMock.go
- p2pAntifloodHandlerStub.go
- p2pMessageMock.go
- peerListCreatorStub.go
- requestedItemsHandlerStub.go
- resolverDebugHandlerStub.go
- resolverStub.go
- resolversContainerStub.go
- resolversFinderStub.go
- throttlerStub.go
- topicHandlerStub.go
- topicMessageHandlerStub.go
- topicResolverSenderStub.go
- txForCurrentBlockMock.go
- uint64ByteSliceConverterMock.go
- whiteListHandlerStub.go