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 PubkeyConverterMock
- 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 ¶ added in v1.1.1
type CurrentBlockProviderStub struct { GetCurrentBlockHeaderCalled func() data.HeaderHandler SetCurrentBlockHeaderAndRootHashCalled func(bh data.HeaderHandler, rootHash []byte) error }
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 -
func (*CurrentBlockProviderStub) SetCurrentBlockHeaderAndRootHash ¶ added in v1.4.0
func (cbps *CurrentBlockProviderStub) SetCurrentBlockHeaderAndRootHash(bh data.HeaderHandler, rootHash []byte) error
SetCurrentBlockHeaderAndRootHash -
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 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 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 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 -