Documentation ¶
Index ¶
- type CurrentBlockProviderStub
- type EpochStartNotifierStub
- func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
- func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
- func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
- func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
- func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
- type EpochStartTriggerStub
- type HardforkHandlerStub
- type HeartbeatMonitorStub
- type HeartbeatSenderInfoProviderStub
- type HeartbeatStorerStub
- func (hss *HeartbeatStorerStub) IsInterfaceNil() bool
- func (hss *HeartbeatStorerStub) LoadGenesisTime() (time.Time, error)
- func (hss *HeartbeatStorerStub) LoadHeartBeatDTO(pubKey string) (*data.HeartbeatDTO, error)
- func (hss *HeartbeatStorerStub) LoadKeys() ([][]byte, error)
- func (hss *HeartbeatStorerStub) SaveKeys(peersSlice [][]byte) error
- func (hss *HeartbeatStorerStub) SavePubkeyData(pubkey []byte, heartbeat *data.HeartbeatDTO) error
- func (hss *HeartbeatStorerStub) UpdateGenesisTime(genesisTime time.Time) error
- type KeyGenMock
- func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
- func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
- func (keyGen *KeyGenMock) IsInterfaceNil() bool
- func (keyGen *KeyGenMock) PrivateKeyFromByteArray(b []byte) (crypto.PrivateKey, error)
- func (keyGen *KeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
- func (keyGen *KeyGenMock) Suite() crypto.Suite
- type MarshallerMock
- type MarshallerStub
- type MessageHandlerStub
- 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
- func (p2pahs *P2PAntifloodHandlerStub) ResetForTopic(_ string)
- func (p2pahs *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
- type P2PMessageStub
- func (msg *P2PMessageStub) Data() []byte
- func (msg *P2PMessageStub) From() []byte
- func (msg *P2PMessageStub) IsInterfaceNil() bool
- func (msg *P2PMessageStub) Key() []byte
- func (msg *P2PMessageStub) Payload() []byte
- func (msg *P2PMessageStub) Peer() core.PeerID
- func (msg *P2PMessageStub) SeqNo() []byte
- func (msg *P2PMessageStub) Signature() []byte
- func (msg *P2PMessageStub) Timestamp() int64
- func (msg *P2PMessageStub) Topic() string
- type PeerBlackListHandlerStub
- type PeerSignatureHandler
- type PeerSignatureHandlerStub
- type PeerTypeProviderStub
- type PrivateKeyStub
- type PubkeyConverterMock
- type PublicKeyMock
- type RedundancyHandlerStub
- type SenderHandlerStub
- type ShardCoordinatorMock
- func (scm *ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
- func (scm *ShardCoordinatorMock) ComputeId(_ []byte) uint32
- func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
- func (scm *ShardCoordinatorMock) NumberOfShards() uint32
- func (scm *ShardCoordinatorMock) SameShard(_, _ []byte) bool
- func (scm *ShardCoordinatorMock) SelfId() uint32
- func (scm *ShardCoordinatorMock) SetSelfShardId(shardId uint32) error
- type SinglesignFailMock
- type SinglesignMock
- type SinglesignStub
- type TimerHandlerStub
- type TimerMock
- type ValidatorMock
- type ValidatorStatisticsStub
- type ValidatorsProviderStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CurrentBlockProviderStub ¶ added in v1.1.1
type CurrentBlockProviderStub struct {
GetCurrentBlockHeaderCalled func() data.HeaderHandler
}
CurrentBlockProviderStub -
func (*CurrentBlockProviderStub) GetCurrentBlockHeader ¶ added in v1.1.1
func (cbps *CurrentBlockProviderStub) GetCurrentBlockHeader() data.HeaderHandler
GetCurrentBlockHeader -
func (*CurrentBlockProviderStub) IsInterfaceNil ¶ added in v1.1.1
func (cbps *CurrentBlockProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
type EpochStartNotifierStub ¶
type EpochStartNotifierStub struct { RegisterHandlerCalled func(handler epochStart.ActionHandler) UnregisterHandlerCalled func(handler epochStart.ActionHandler) NotifyAllCalled func(hdr data.HeaderHandler) NotifyAllPrepareCalled func(hdr data.HeaderHandler, body data.BodyHandler) // contains filtered or unexported fields }
EpochStartNotifierStub -
func (*EpochStartNotifierStub) IsInterfaceNil ¶
func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartNotifierStub) NotifyAll ¶
func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
NotifyAll -
func (*EpochStartNotifierStub) NotifyAllPrepare ¶
func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
NotifyAllPrepare -
func (*EpochStartNotifierStub) RegisterHandler ¶
func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
func (*EpochStartNotifierStub) UnregisterHandler ¶
func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
UnregisterHandler -
type EpochStartTriggerStub ¶
type EpochStartTriggerStub struct {
MetaEpochCalled func() uint32
}
EpochStartTriggerStub -
func (*EpochStartTriggerStub) IsInterfaceNil ¶
func (e *EpochStartTriggerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartTriggerStub) MetaEpoch ¶
func (e *EpochStartTriggerStub) MetaEpoch() uint32
MetaEpoch -
type HardforkHandlerStub ¶ added in v1.3.37
type HardforkHandlerStub struct { ShouldTriggerHardforkCalled func() <-chan struct{} ExecuteCalled func() CloseCalled func() }
HardforkHandlerStub -
func (*HardforkHandlerStub) Close ¶ added in v1.3.37
func (stub *HardforkHandlerStub) Close()
Close -
func (*HardforkHandlerStub) Execute ¶ added in v1.3.37
func (stub *HardforkHandlerStub) Execute()
Execute -
func (*HardforkHandlerStub) ShouldTriggerHardfork ¶ added in v1.3.37
func (stub *HardforkHandlerStub) ShouldTriggerHardfork() <-chan struct{}
ShouldTriggerHardfork -
type HeartbeatMonitorStub ¶ added in v1.3.39
type HeartbeatMonitorStub struct {
GetHeartbeatsCalled func() []data.PubKeyHeartbeat
}
HeartbeatMonitorStub -
func (*HeartbeatMonitorStub) GetHeartbeats ¶ added in v1.3.39
func (stub *HeartbeatMonitorStub) GetHeartbeats() []data.PubKeyHeartbeat
GetHeartbeats -
func (*HeartbeatMonitorStub) IsInterfaceNil ¶ added in v1.3.39
func (stub *HeartbeatMonitorStub) IsInterfaceNil() bool
IsInterfaceNil -
type HeartbeatSenderInfoProviderStub ¶ added in v1.3.39
type HeartbeatSenderInfoProviderStub struct {
GetSenderInfoCalled func() (string, core.P2PPeerSubType, error)
}
HeartbeatSenderInfoProviderStub -
func (*HeartbeatSenderInfoProviderStub) GetSenderInfo ¶ added in v1.3.39
func (stub *HeartbeatSenderInfoProviderStub) GetSenderInfo() (string, core.P2PPeerSubType, error)
GetSenderInfo -
func (*HeartbeatSenderInfoProviderStub) IsInterfaceNil ¶ added in v1.3.39
func (stub *HeartbeatSenderInfoProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
type HeartbeatStorerStub ¶
type HeartbeatStorerStub struct { LoadGenesisTimeCalled func() (time.Time, error) UpdateGenesisTimeCalled func(genesisTime time.Time) error LoadHeartBeatDTOCalled func(pubKey string) (*data.HeartbeatDTO, error) SavePubkeyDataCalled func(pubkey []byte, heartbeat *data.HeartbeatDTO) error LoadKeysCalled func() ([][]byte, error) SaveKeysCalled func(peersSlice [][]byte) error }
HeartbeatStorerStub -
func (*HeartbeatStorerStub) IsInterfaceNil ¶
func (hss *HeartbeatStorerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeartbeatStorerStub) LoadGenesisTime ¶
func (hss *HeartbeatStorerStub) LoadGenesisTime() (time.Time, error)
LoadGenesisTime -
func (*HeartbeatStorerStub) LoadHeartBeatDTO ¶
func (hss *HeartbeatStorerStub) LoadHeartBeatDTO(pubKey string) (*data.HeartbeatDTO, error)
LoadHeartBeatDTO -
func (*HeartbeatStorerStub) LoadKeys ¶
func (hss *HeartbeatStorerStub) LoadKeys() ([][]byte, error)
LoadKeys -
func (*HeartbeatStorerStub) SaveKeys ¶
func (hss *HeartbeatStorerStub) SaveKeys(peersSlice [][]byte) error
SaveKeys -
func (*HeartbeatStorerStub) SavePubkeyData ¶
func (hss *HeartbeatStorerStub) SavePubkeyData(pubkey []byte, heartbeat *data.HeartbeatDTO) error
SavePubkeyData -
func (*HeartbeatStorerStub) UpdateGenesisTime ¶
func (hss *HeartbeatStorerStub) UpdateGenesisTime(genesisTime time.Time) error
UpdateGenesisTime -
type KeyGenMock ¶
type KeyGenMock struct { GeneratePairMock func() (crypto.PrivateKey, crypto.PublicKey) PrivateKeyFromByteArrayMock func(b []byte) (crypto.PrivateKey, error) PublicKeyFromByteArrayMock func(b []byte) (crypto.PublicKey, error) SuiteMock func() crypto.Suite }
KeyGenMock -
func (*KeyGenMock) CheckPublicKeyValid ¶ added in v1.0.120
func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
CheckPublicKeyValid -
func (*KeyGenMock) GeneratePair ¶
func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*KeyGenMock) IsInterfaceNil ¶
func (keyGen *KeyGenMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*KeyGenMock) PrivateKeyFromByteArray ¶
func (keyGen *KeyGenMock) PrivateKeyFromByteArray(b []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGenMock) PublicKeyFromByteArray ¶
func (keyGen *KeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
type MarshallerMock ¶ added in v1.3.37
type MarshallerMock struct {
Fail bool
}
MarshallerMock that will be used for testing
func (*MarshallerMock) IsInterfaceNil ¶ added in v1.3.37
func (mm *MarshallerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshallerMock) Marshal ¶ added in v1.3.37
func (mm *MarshallerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshallerMock) Unmarshal ¶ added in v1.3.37
func (mm *MarshallerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MarshallerStub ¶ added in v1.3.37
type MarshallerStub struct { MarshalHandler func(obj interface{}) ([]byte, error) UnmarshalHandler func(obj interface{}, buff []byte) error }
MarshallerStub -
func (*MarshallerStub) IsInterfaceNil ¶ added in v1.3.37
func (ms *MarshallerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (MarshallerStub) Marshal ¶ added in v1.3.37
func (ms MarshallerStub) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (MarshallerStub) Unmarshal ¶ added in v1.3.37
func (ms MarshallerStub) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type MessageHandlerStub ¶
type MessageHandlerStub struct {
CreateHeartbeatFromP2PMessageCalled func(message p2p.MessageP2P) (*data.Heartbeat, error)
}
MessageHandlerStub -
func (*MessageHandlerStub) CreateHeartbeatFromP2PMessage ¶
func (mhs *MessageHandlerStub) CreateHeartbeatFromP2PMessage(message p2p.MessageP2P) (*data.Heartbeat, error)
CreateHeartbeatFromP2PMessage -
func (*MessageHandlerStub) IsInterfaceNil ¶
func (mhs *MessageHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
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 ¶
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 -
func (*P2PAntifloodHandlerStub) ResetForTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) ResetForTopic(_ string)
ResetForTopic -
func (*P2PAntifloodHandlerStub) SetMaxMessagesForTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
SetMaxMessagesForTopic -
type P2PMessageStub ¶
type P2PMessageStub struct { FromField []byte DataField []byte SeqNoField []byte TopicField string SignatureField []byte KeyField []byte PeerField core.PeerID PayloadField []byte TimestampField int64 }
P2PMessageStub -
func (*P2PMessageStub) IsInterfaceNil ¶
func (msg *P2PMessageStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*P2PMessageStub) Payload ¶ added in v1.0.133
func (msg *P2PMessageStub) Payload() []byte
Payload -
func (*P2PMessageStub) Timestamp ¶ added in v1.0.133
func (msg *P2PMessageStub) Timestamp() int64
Timestamp -
type PeerBlackListHandlerStub ¶ added in v1.0.127
type PeerBlackListHandlerStub struct { AddCalled func(pid core.PeerID) error HasCalled func(pid core.PeerID) bool SweepCalled func() }
PeerBlackListHandlerStub -
func (*PeerBlackListHandlerStub) Add ¶ added in v1.0.127
func (pblhs *PeerBlackListHandlerStub) Add(pid core.PeerID) error
Add -
func (*PeerBlackListHandlerStub) Has ¶ added in v1.0.127
func (pblhs *PeerBlackListHandlerStub) Has(pid core.PeerID) bool
Has -
func (*PeerBlackListHandlerStub) IsInterfaceNil ¶ added in v1.0.127
func (pblhs *PeerBlackListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerBlackListHandlerStub) Sweep ¶ added in v1.0.127
func (pblhs *PeerBlackListHandlerStub) Sweep()
Sweep -
type PeerSignatureHandler ¶ added in v1.0.138
type PeerSignatureHandler struct { Signer crypto.SingleSigner KeyGen crypto.KeyGenerator }
PeerSignatureHandler -
func (*PeerSignatureHandler) GetPeerSignature ¶ added in v1.0.138
func (p *PeerSignatureHandler) GetPeerSignature(privateKey crypto.PrivateKey, msg []byte) ([]byte, error)
GetPeerSignature -
func (*PeerSignatureHandler) IsInterfaceNil ¶ added in v1.0.138
func (p *PeerSignatureHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerSignatureHandler) VerifyPeerSignature ¶ added in v1.0.138
VerifyPeerSignature -
type PeerSignatureHandlerStub ¶ added in v1.3.37
type PeerSignatureHandlerStub struct { VerifyPeerSignatureCalled func(pk []byte, pid core.PeerID, signature []byte) error GetPeerSignatureCalled func(key crypto.PrivateKey, pid []byte) ([]byte, error) }
PeerSignatureHandlerStub -
func (*PeerSignatureHandlerStub) GetPeerSignature ¶ added in v1.3.37
func (stub *PeerSignatureHandlerStub) GetPeerSignature(key crypto.PrivateKey, pid []byte) ([]byte, error)
GetPeerSignature -
func (*PeerSignatureHandlerStub) IsInterfaceNil ¶ added in v1.3.37
func (stub *PeerSignatureHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerSignatureHandlerStub) VerifyPeerSignature ¶ added in v1.3.37
func (stub *PeerSignatureHandlerStub) VerifyPeerSignature(pk []byte, pid core.PeerID, signature []byte) error
VerifyPeerSignature -
type PeerTypeProviderStub ¶
type PeerTypeProviderStub struct {
ComputeForPubKeyCalled func(pubKey []byte) (common.PeerType, uint32, error)
}
PeerTypeProviderStub -
func (*PeerTypeProviderStub) Close ¶ added in v1.0.117
func (p *PeerTypeProviderStub) Close() error
Close -
func (*PeerTypeProviderStub) ComputeForPubKey ¶
ComputeForPubKey -
func (*PeerTypeProviderStub) GetAllPeerTypeInfos ¶ added in v1.0.117
func (p *PeerTypeProviderStub) GetAllPeerTypeInfos() []*state.PeerTypeInfo
GetAllPeerTypeInfos -
func (*PeerTypeProviderStub) IsInterfaceNil ¶
func (p *PeerTypeProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
type PrivateKeyStub ¶
type PrivateKeyStub struct { ToByteArrayHandler func() ([]byte, error) GeneratePublicHandler func() crypto.PublicKey SuiteHandler func() crypto.Suite ScalarHandler func() crypto.Scalar }
PrivateKeyStub -
func (*PrivateKeyStub) GeneratePublic ¶
func (sk *PrivateKeyStub) GeneratePublic() crypto.PublicKey
GeneratePublic -
func (*PrivateKeyStub) IsInterfaceNil ¶
func (sk *PrivateKeyStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PrivateKeyStub) ToByteArray ¶
func (sk *PrivateKeyStub) ToByteArray() ([]byte, error)
ToByteArray -
type PubkeyConverterMock ¶
type PubkeyConverterMock struct {
// contains filtered or unexported fields
}
PubkeyConverterMock -
func NewPubkeyConverterMock ¶
func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock
NewPubkeyConverterMock -
func (*PubkeyConverterMock) Decode ¶
func (pcm *PubkeyConverterMock) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterMock) Encode ¶
func (pcm *PubkeyConverterMock) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterMock) IsInterfaceNil ¶
func (pcm *PubkeyConverterMock) IsInterfaceNil() bool
IsInterfaceNil -
type PublicKeyMock ¶
type PublicKeyMock struct { ToByteArrayHandler func() ([]byte, error) SuiteCalled func() crypto.Suite PointCalled func() crypto.Point }
PublicKeyMock -
func (*PublicKeyMock) IsInterfaceNil ¶
func (sspk *PublicKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PublicKeyMock) ToByteArray ¶
func (sspk *PublicKeyMock) ToByteArray() ([]byte, error)
ToByteArray -
type RedundancyHandlerStub ¶ added in v1.1.32
type RedundancyHandlerStub struct { IsRedundancyNodeCalled func() bool IsMainMachineActiveCalled func() bool ObserverPrivateKeyCalled func() crypto.PrivateKey }
RedundancyHandlerStub -
func (*RedundancyHandlerStub) IsInterfaceNil ¶ added in v1.1.32
func (rhs *RedundancyHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*RedundancyHandlerStub) IsMainMachineActive ¶ added in v1.1.32
func (rhs *RedundancyHandlerStub) IsMainMachineActive() bool
IsMainMachineActive -
func (*RedundancyHandlerStub) IsRedundancyNode ¶ added in v1.1.32
func (rhs *RedundancyHandlerStub) IsRedundancyNode() bool
IsRedundancyNode -
func (*RedundancyHandlerStub) ObserverPrivateKey ¶ added in v1.1.32
func (rhs *RedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
ObserverPrivateKey -
type SenderHandlerStub ¶ added in v1.3.37
type SenderHandlerStub struct { ExecutionReadyChannelCalled func() <-chan time.Time ExecuteCalled func() CloseCalled func() }
SenderHandlerStub -
func (*SenderHandlerStub) Execute ¶ added in v1.3.37
func (stub *SenderHandlerStub) Execute()
Execute -
func (*SenderHandlerStub) ExecutionReadyChannel ¶ added in v1.3.37
func (stub *SenderHandlerStub) ExecutionReadyChannel() <-chan time.Time
ExecutionReadyChannel -
func (*SenderHandlerStub) IsInterfaceNil ¶ added in v1.3.37
func (stub *SenderHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ShardCoordinatorMock ¶
type ShardCoordinatorMock struct {
SelfShardId uint32
}
ShardCoordinatorMock -
func (*ShardCoordinatorMock) CommunicationIdentifier ¶
func (scm *ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*ShardCoordinatorMock) ComputeId ¶
func (scm *ShardCoordinatorMock) ComputeId(_ []byte) uint32
ComputeId -
func (*ShardCoordinatorMock) IsInterfaceNil ¶
func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardCoordinatorMock) NumberOfShards ¶
func (scm *ShardCoordinatorMock) NumberOfShards() uint32
NumberOfShards -
func (*ShardCoordinatorMock) SameShard ¶
func (scm *ShardCoordinatorMock) SameShard(_, _ []byte) bool
SameShard -
func (*ShardCoordinatorMock) SetSelfShardId ¶
func (scm *ShardCoordinatorMock) SetSelfShardId(shardId uint32) error
SetSelfShardId -
type SinglesignFailMock ¶
type SinglesignFailMock struct { }
SinglesignFailMock -
func (*SinglesignFailMock) IsInterfaceNil ¶
func (s *SinglesignFailMock) IsInterfaceNil() bool
IsInterfaceNil -
type SinglesignMock ¶
type SinglesignMock struct { }
SinglesignMock -
func (*SinglesignMock) IsInterfaceNil ¶
func (s *SinglesignMock) IsInterfaceNil() bool
IsInterfaceNil -
type SinglesignStub ¶
type SinglesignStub struct { SignCalled func(private crypto.PrivateKey, msg []byte) ([]byte, error) VerifyCalled func(public crypto.PublicKey, msg []byte, sig []byte) error }
SinglesignStub -
func (*SinglesignStub) IsInterfaceNil ¶
func (s *SinglesignStub) IsInterfaceNil() bool
IsInterfaceNil -
type TimerHandlerStub ¶ added in v1.3.37
type TimerHandlerStub struct { CreateNewTimerCalled func(duration time.Duration) ExecutionReadyChannelCalled func() <-chan time.Time CloseCalled func() }
TimerHandlerStub -
func (*TimerHandlerStub) CreateNewTimer ¶ added in v1.3.37
func (stub *TimerHandlerStub) CreateNewTimer(duration time.Duration)
CreateNewTimer -
func (*TimerHandlerStub) ExecutionReadyChannel ¶ added in v1.3.37
func (stub *TimerHandlerStub) ExecutionReadyChannel() <-chan time.Time
ExecutionReadyChannel -
type ValidatorMock ¶
type ValidatorMock struct {
// contains filtered or unexported fields
}
ValidatorMock -
func NewValidatorMock ¶
func NewValidatorMock(pubKey []byte, chances uint32, index uint32) *ValidatorMock
NewValidatorMock -
type ValidatorStatisticsStub ¶
type ValidatorStatisticsStub struct { RootHashCalled func() ([]byte, error) GetValidatorInfoForRootHashCalled func(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error) }
ValidatorStatisticsStub -
func (*ValidatorStatisticsStub) GetValidatorInfoForRootHash ¶
func (vss *ValidatorStatisticsStub) GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
GetValidatorInfoForRootHash -
func (*ValidatorStatisticsStub) IsInterfaceNil ¶
func (vss *ValidatorStatisticsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorStatisticsStub) RootHash ¶
func (vss *ValidatorStatisticsStub) RootHash() ([]byte, error)
RootHash -
type ValidatorsProviderStub ¶ added in v1.0.117
type ValidatorsProviderStub struct {
GetLatestValidatorsCalled func() map[string]*state.ValidatorApiResponse
}
ValidatorsProviderStub -
func (*ValidatorsProviderStub) Close ¶ added in v1.2.0
func (vp *ValidatorsProviderStub) Close() error
Close -
func (*ValidatorsProviderStub) GetLatestValidators ¶ added in v1.0.117
func (vp *ValidatorsProviderStub) GetLatestValidators() map[string]*state.ValidatorApiResponse
GetLatestValidators -
func (*ValidatorsProviderStub) IsInterfaceNil ¶ added in v1.0.117
func (vp *ValidatorsProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
Source Files ¶
- currentBlockProviderStub.go
- endOfEpochTriggerStub.go
- epochStartNotifier.go
- hardforkHandlerStub.go
- heartbeatMonitorStub.go
- heartbeatSenderInfoProviderStub.go
- heartbeatStorerStub.go
- keyMock.go
- marshallerMock.go
- marshallerStub.go
- messageHandlerStub.go
- p2pAntifloodHandlerStub.go
- p2pMessageStub.go
- peerBlackListHandlerStub.go
- peerSignatureHandlerMock.go
- peerSignatureHandlerStub.go
- peerTypeProviderStub.go
- pubkeyConverterMock.go
- redundancyHandlerStub.go
- senderHandlerStub.go
- shardCoordinatorMock.go
- singlesignerMock.go
- timerHandlerStub.go
- timerMock.go
- validatorMock.go
- validatorStatisticsStub.go
- validatorsProviderStub.go