Documentation
¶
Index ¶
- type EnableEpochsHandlerMock
- func (mock *EnableEpochsHandlerMock) GetActivationEpoch(flag core.EnableEpochFlag) uint32
- func (mock *EnableEpochsHandlerMock) GetCurrentEpoch() uint32
- func (mock *EnableEpochsHandlerMock) IsFlagDefined(_ core.EnableEpochFlag) bool
- func (mock *EnableEpochsHandlerMock) IsFlagEnabled(_ core.EnableEpochFlag) bool
- func (mock *EnableEpochsHandlerMock) IsFlagEnabledInEpoch(_ core.EnableEpochFlag, _ uint32) bool
- func (mock *EnableEpochsHandlerMock) IsInterfaceNil() bool
- type MarshalizerMock
- type NodesCoordinatorCacheMock
- type NodesSetupMock
- type PubkeyConverterMock
- func (pcm *PubkeyConverterMock) Decode(humanReadable string) ([]byte, error)
- func (pcm *PubkeyConverterMock) Encode(pkBytes []byte) (string, error)
- func (pcm *PubkeyConverterMock) EncodeSlice(pkBytesSlice [][]byte) ([]string, error)
- func (pcm *PubkeyConverterMock) IsInterfaceNil() bool
- func (pcm *PubkeyConverterMock) Len() int
- func (pcm *PubkeyConverterMock) SilentEncode(pkBytes []byte, log core.Logger) string
- type RaterMock
- type ShuffledOutHandlerStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnableEpochsHandlerMock ¶
type EnableEpochsHandlerMock struct {
RefactorPeersMiniBlocksEnableEpochField uint32
IsRefactorPeersMiniBlocksFlagEnabledField bool
CurrentEpoch uint32
}
EnableEpochsHandlerMock -
func (*EnableEpochsHandlerMock) GetActivationEpoch ¶ added in v1.7.0
func (mock *EnableEpochsHandlerMock) GetActivationEpoch(flag core.EnableEpochFlag) uint32
GetActivationEpoch -
func (*EnableEpochsHandlerMock) GetCurrentEpoch ¶ added in v1.7.0
func (mock *EnableEpochsHandlerMock) GetCurrentEpoch() uint32
GetCurrentEpoch -
func (*EnableEpochsHandlerMock) IsFlagDefined ¶ added in v1.7.0
func (mock *EnableEpochsHandlerMock) IsFlagDefined(_ core.EnableEpochFlag) bool
IsFlagDefined returns true
func (*EnableEpochsHandlerMock) IsFlagEnabled ¶ added in v1.7.0
func (mock *EnableEpochsHandlerMock) IsFlagEnabled(_ core.EnableEpochFlag) bool
IsFlagEnabled returns true
func (*EnableEpochsHandlerMock) IsFlagEnabledInEpoch ¶ added in v1.7.0
func (mock *EnableEpochsHandlerMock) IsFlagEnabledInEpoch(_ core.EnableEpochFlag, _ uint32) bool
IsFlagEnabledInEpoch returns true
func (*EnableEpochsHandlerMock) IsInterfaceNil ¶
func (mock *EnableEpochsHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
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 NodesCoordinatorCacheMock ¶
type NodesCoordinatorCacheMock struct {
ClearCalled func()
PutCalled func(key []byte, value interface{}, sieInBytes int) (evicted bool)
GetCalled func(key []byte) (value interface{}, ok bool)
}
NodesCoordinatorCacheMock -
func (*NodesCoordinatorCacheMock) Get ¶
func (rm *NodesCoordinatorCacheMock) Get(key []byte) (value interface{}, ok bool)
Get -
type NodesSetupMock ¶ added in v1.7.0
type NodesSetupMock struct {
MinShardHysteresisNodesCalled func() uint32
MinMetaHysteresisNodesCalled func() uint32
}
NodesSetupMock -
func (*NodesSetupMock) IsInterfaceNil ¶ added in v1.7.0
func (mock *NodesSetupMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodesSetupMock) MinMetaHysteresisNodes ¶ added in v1.7.0
func (mock *NodesSetupMock) MinMetaHysteresisNodes() uint32
MinMetaHysteresisNodes -
func (*NodesSetupMock) MinShardHysteresisNodes ¶ added in v1.7.0
func (mock *NodesSetupMock) MinShardHysteresisNodes() uint32
MinShardHysteresisNodes -
type PubkeyConverterMock ¶
type PubkeyConverterMock struct {
DecodeCalled func() ([]byte, error)
// 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, error)
Encode -
func (*PubkeyConverterMock) EncodeSlice ¶ added in v1.6.0
func (pcm *PubkeyConverterMock) EncodeSlice(pkBytesSlice [][]byte) ([]string, error)
EncodeSlice -
func (*PubkeyConverterMock) IsInterfaceNil ¶
func (pcm *PubkeyConverterMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*PubkeyConverterMock) SilentEncode ¶ added in v1.6.0
func (pcm *PubkeyConverterMock) SilentEncode(pkBytes []byte, log core.Logger) string
SilentEncode -
type RaterMock ¶
type RaterMock struct {
ComputeRatingCalled func(string, uint32) uint32
GetRatingCalled func(string) uint32
GetStartRatingCalled func() uint32
GetChancesCalled func(uint32) uint32
}
RaterMock -
func (*RaterMock) ComputeRating ¶
ComputeRating -
type ShuffledOutHandlerStub ¶
type ShuffledOutHandlerStub struct {
ProcessCalled func(newShardID uint32) error
RegisterHandlerCalled func(handler func(newShardID uint32))
CurrentShardIDCalled func() uint32
}
ShuffledOutHandlerStub -
func (*ShuffledOutHandlerStub) CurrentShardID ¶
func (s *ShuffledOutHandlerStub) CurrentShardID() uint32
CurrentShardID -
func (*ShuffledOutHandlerStub) IsInterfaceNil ¶
func (s *ShuffledOutHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ShuffledOutHandlerStub) Process ¶
func (s *ShuffledOutHandlerStub) Process(newShardID uint32) error
Process -
func (*ShuffledOutHandlerStub) RegisterHandler ¶
func (s *ShuffledOutHandlerStub) RegisterHandler(handler func(newShardID uint32))
RegisterHandler -