Versions in this module Expand all Collapse all v0 v0.0.1 Nov 7, 2024 Changes in this version + func NewMultipleShardsCoordinatorFake(numOfShards uint32, currentShard uint32) *multipleShardsCoordinatorFake + type EnableEpochsHandlerMock struct + CurrentEpoch uint32 + IsRefactorPeersMiniBlocksFlagEnabledField bool + RefactorPeersMiniBlocksEnableEpochField uint32 + 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 struct + EpochValue uint32 + func (ehm *EpochHandlerMock) Epoch() uint32 + func (ehm *EpochHandlerMock) IsInterfaceNil() bool + type EpochHandlerStub struct + EpochCalled func() uint32 + func (ehs *EpochHandlerStub) Epoch() uint32 + func (ehs *EpochHandlerStub) IsInterfaceNil() bool + type EpochStartNotifierStub struct + NotifyAllCalled func(hdr data.HeaderHandler) + NotifyAllPrepareCalled func(hdr data.HeaderHandler, body data.BodyHandler, ...) + RegisterHandlerCalled func(handler epochStart.ActionHandler) + UnregisterHandlerCalled func(handler epochStart.ActionHandler) + 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 struct + ComputeCalled func(s string) []byte + EmptyHashCalled func() []byte + SizeCalled func() int + func (hs *HasherStub) Compute(s string) []byte + func (hs *HasherStub) EmptyHash() []byte + func (hs *HasherStub) IsInterfaceNil() bool + func (hs *HasherStub) Size() int + type ListIndexUpdaterStub struct + UpdateListAndIndexCalled func(pubKey string, shardID uint32, list string, index uint32) error + func (lius *ListIndexUpdaterStub) IsInterfaceNil() bool + func (lius *ListIndexUpdaterStub) UpdateListAndIndex(pubKey string, shardID uint32, list string, index uint32) error + type MarshalizerMock struct + Fail bool + func (mm *MarshalizerMock) IsInterfaceNil() bool + func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error) + func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error + type NodesCoordinatorCacheMock struct + ClearCalled func() + GetCalled func(key []byte) (value interface{}, ok bool) + PutCalled func(key []byte, value interface{}, sieInBytes int) (evicted bool) + func (rm *NodesCoordinatorCacheMock) Clear() + func (rm *NodesCoordinatorCacheMock) Get(key []byte) (value interface{}, ok bool) + func (rm *NodesCoordinatorCacheMock) Put(key []byte, value interface{}, sizeInBytes int) (evicted bool) + type NodesSetupMock struct + MinMetaHysteresisNodesCalled func() uint32 + MinShardHysteresisNodesCalled func() uint32 + func (mock *NodesSetupMock) IsInterfaceNil() bool + func (mock *NodesSetupMock) MinMetaHysteresisNodes() uint32 + func (mock *NodesSetupMock) MinShardHysteresisNodes() uint32 + type PubkeyConverterMock struct + func NewPubkeyConverterMock(addressLen int) *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 struct + ComputeRatingCalled func(string, uint32) uint32 + GetChancesCalled func(uint32) uint32 + GetRatingCalled func(string) uint32 + GetStartRatingCalled func() uint32 + func (rm *RaterMock) ComputeRating(ratingOptionKey string, previousValue uint32) uint32 + func (rm *RaterMock) GetChance(rating uint32) uint32 + func (rm *RaterMock) GetRating(pk string) uint32 + func (rm *RaterMock) GetStartRating() uint32 + func (rm *RaterMock) IsInterfaceNil() bool + type ShuffledOutHandlerStub struct + CurrentShardIDCalled func() uint32 + ProcessCalled func(newShardID uint32) error + RegisterHandlerCalled func(handler func(newShardID uint32)) + func (s *ShuffledOutHandlerStub) CurrentShardID() uint32 + func (s *ShuffledOutHandlerStub) IsInterfaceNil() bool + func (s *ShuffledOutHandlerStub) Process(newShardID uint32) error + func (s *ShuffledOutHandlerStub) RegisterHandler(handler func(newShardID uint32))