Documentation ¶
Index ¶
- type CurrentBlockProviderStub
- type HardforkHandlerStub
- type HeartbeatMonitorStub
- type HeartbeatSenderInfoProviderStub
- 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 PeerSignatureHandlerStub
- type PeerTypeProviderStub
- type PrivateKeyStub
- type PublicKeyMock
- type RedundancyHandlerStub
- type SenderHandlerStub
- type TimerHandlerStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CurrentBlockProviderStub ¶
type CurrentBlockProviderStub struct { GetCurrentBlockHeaderCalled func() data.HeaderHandler SetCurrentBlockHeaderAndRootHashCalled func(bh data.HeaderHandler, rootHash []byte) error }
CurrentBlockProviderStub -
func (*CurrentBlockProviderStub) GetCurrentBlockHeader ¶
func (cbps *CurrentBlockProviderStub) GetCurrentBlockHeader() data.HeaderHandler
GetCurrentBlockHeader -
func (*CurrentBlockProviderStub) IsInterfaceNil ¶
func (cbps *CurrentBlockProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*CurrentBlockProviderStub) SetCurrentBlockHeaderAndRootHash ¶
func (cbps *CurrentBlockProviderStub) SetCurrentBlockHeaderAndRootHash(bh data.HeaderHandler, rootHash []byte) error
SetCurrentBlockHeaderAndRootHash -
type HardforkHandlerStub ¶
type HardforkHandlerStub struct { ShouldTriggerHardforkCalled func() <-chan struct{} ExecuteCalled func() CloseCalled func() }
HardforkHandlerStub -
func (*HardforkHandlerStub) ShouldTriggerHardfork ¶
func (stub *HardforkHandlerStub) ShouldTriggerHardfork() <-chan struct{}
ShouldTriggerHardfork -
type HeartbeatMonitorStub ¶
type HeartbeatMonitorStub struct {
GetHeartbeatsCalled func() []data.PubKeyHeartbeat
}
HeartbeatMonitorStub -
func (*HeartbeatMonitorStub) GetHeartbeats ¶
func (stub *HeartbeatMonitorStub) GetHeartbeats() []data.PubKeyHeartbeat
GetHeartbeats -
func (*HeartbeatMonitorStub) IsInterfaceNil ¶
func (stub *HeartbeatMonitorStub) IsInterfaceNil() bool
IsInterfaceNil -
type HeartbeatSenderInfoProviderStub ¶
type HeartbeatSenderInfoProviderStub struct {
GetCurrentNodeTypeCalled func() (string, core.P2PPeerSubType, error)
}
HeartbeatSenderInfoProviderStub -
func (*HeartbeatSenderInfoProviderStub) GetCurrentNodeType ¶ added in v1.6.0
func (stub *HeartbeatSenderInfoProviderStub) GetCurrentNodeType() (string, core.P2PPeerSubType, error)
GetCurrentNodeType -
func (*HeartbeatSenderInfoProviderStub) IsInterfaceNil ¶
func (stub *HeartbeatSenderInfoProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
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 ¶
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 PeerSignatureHandlerStub ¶
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 ¶
func (stub *PeerSignatureHandlerStub) GetPeerSignature(key crypto.PrivateKey, pid []byte) ([]byte, error)
GetPeerSignature -
func (*PeerSignatureHandlerStub) IsInterfaceNil ¶
func (stub *PeerSignatureHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerSignatureHandlerStub) VerifyPeerSignature ¶
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) ComputeForPubKey ¶
ComputeForPubKey -
func (*PeerTypeProviderStub) GetAllPeerTypeInfos ¶
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 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 ¶
type RedundancyHandlerStub struct { IsRedundancyNodeCalled func() bool IsMainMachineActiveCalled func() bool ObserverPrivateKeyCalled func() crypto.PrivateKey }
RedundancyHandlerStub -
func (*RedundancyHandlerStub) IsInterfaceNil ¶
func (rhs *RedundancyHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*RedundancyHandlerStub) IsMainMachineActive ¶
func (rhs *RedundancyHandlerStub) IsMainMachineActive() bool
IsMainMachineActive -
func (*RedundancyHandlerStub) IsRedundancyNode ¶
func (rhs *RedundancyHandlerStub) IsRedundancyNode() bool
IsRedundancyNode -
func (*RedundancyHandlerStub) ObserverPrivateKey ¶
func (rhs *RedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
ObserverPrivateKey -
type SenderHandlerStub ¶
type SenderHandlerStub struct { ExecutionReadyChannelCalled func() <-chan time.Time ExecuteCalled func() CloseCalled func() }
SenderHandlerStub -
func (*SenderHandlerStub) ExecutionReadyChannel ¶
func (stub *SenderHandlerStub) ExecutionReadyChannel() <-chan time.Time
ExecutionReadyChannel -
func (*SenderHandlerStub) IsInterfaceNil ¶
func (stub *SenderHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type TimerHandlerStub ¶
type TimerHandlerStub struct { CreateNewTimerCalled func(duration time.Duration) ExecutionReadyChannelCalled func() <-chan time.Time CloseCalled func() }
TimerHandlerStub -
func (*TimerHandlerStub) CreateNewTimer ¶
func (stub *TimerHandlerStub) CreateNewTimer(duration time.Duration)
CreateNewTimer -
func (*TimerHandlerStub) ExecutionReadyChannel ¶
func (stub *TimerHandlerStub) ExecutionReadyChannel() <-chan time.Time
ExecutionReadyChannel -