Documentation ¶
Index ¶
- func NewMultipleShardsCoordinatorFake(numOfShards uint32, currentShard uint32) *multipleShardsCoordinatorFake
- type EnableEpochsHandlerMock
- func (mock *EnableEpochsHandlerMock) FixGasRemainingForSaveKeyValueBuiltinFunctionEnabled() bool
- 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 EpochHandlerMock
- type EpochHandlerStub
- 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 HasherStub
- type ListIndexUpdaterStub
- 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 ¶
func NewMultipleShardsCoordinatorFake ¶
func NewMultipleShardsCoordinatorFake(numOfShards uint32, currentShard uint32) *multipleShardsCoordinatorFake
NewMultipleShardsCoordinatorFake -
Types ¶
type EnableEpochsHandlerMock ¶
type EnableEpochsHandlerMock struct { RefactorPeersMiniBlocksEnableEpochField uint32 IsRefactorPeersMiniBlocksFlagEnabledField bool CurrentEpoch uint32 }
EnableEpochsHandlerMock -
func (*EnableEpochsHandlerMock) FixGasRemainingForSaveKeyValueBuiltinFunctionEnabled ¶ added in v1.6.4
func (mock *EnableEpochsHandlerMock) FixGasRemainingForSaveKeyValueBuiltinFunctionEnabled() bool
FixGasRemainingForSaveKeyValueBuiltinFunctionEnabled -
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 EpochHandlerMock ¶
type EpochHandlerMock struct {
EpochValue uint32
}
EpochHandlerMock -
func (*EpochHandlerMock) IsInterfaceNil ¶
func (ehm *EpochHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
type EpochHandlerStub ¶
type EpochHandlerStub struct {
EpochCalled func() uint32
}
EpochHandlerStub -
func (*EpochHandlerStub) IsInterfaceNil ¶
func (ehs *EpochHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type EpochStartNotifierStub ¶
type EpochStartNotifierStub struct { RegisterHandlerCalled func(handler epochStart.ActionHandler) UnregisterHandlerCalled func(handler epochStart.ActionHandler) NotifyAllPrepareCalled func(hdr data.HeaderHandler, body data.BodyHandler, validatorInfoCacher epochStart.ValidatorInfoCacher) NotifyAllCalled func(hdr data.HeaderHandler) }
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, validatorInfoCacher epochStart.ValidatorInfoCacher)
NotifyAllPrepare -
func (*EpochStartNotifierStub) RegisterHandler ¶
func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
func (*EpochStartNotifierStub) UnregisterHandler ¶
func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
UnregisterHandler -
type HasherStub ¶
type HasherStub struct { ComputeCalled func(s string) []byte EmptyHashCalled func() []byte SizeCalled func() int }
HasherStub -
func (*HasherStub) Compute ¶
func (hs *HasherStub) Compute(s string) []byte
Compute will output the SHA's equivalent of the input string
func (*HasherStub) EmptyHash ¶
func (hs *HasherStub) EmptyHash() []byte
EmptyHash will return the equivalent of empty string SHA's
func (*HasherStub) IsInterfaceNil ¶
func (hs *HasherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type ListIndexUpdaterStub ¶
type ListIndexUpdaterStub struct {
UpdateListAndIndexCalled func(pubKey string, shardID uint32, list string, index uint32) error
}
ListIndexUpdaterStub -
func (*ListIndexUpdaterStub) IsInterfaceNil ¶
func (lius *ListIndexUpdaterStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ListIndexUpdaterStub) UpdateListAndIndex ¶
func (lius *ListIndexUpdaterStub) UpdateListAndIndex(pubKey string, shardID uint32, list string, index uint32) error
UpdateListAndIndex -
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 {
// 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 -