Versions in this module Expand all Collapse all v0 v0.0.2 Oct 31, 2023 Changes in this version type HeaderHandlerStub + func (hhs *HeaderHandlerStub) GetReserved() []byte type StorerMock + func (sm *StorerMock) GetBulkFromEpoch(keys [][]byte, _ uint32) (map[string][]byte, error) + func (sm *StorerMock) RangeKeys(_ func(key []byte, val []byte) bool) v0.0.1 Oct 30, 2023 Changes in this version + func NewMultipleShardsCoordinatorFake(numOfShards uint32, currentShard uint32) *multipleShardsCoordinatorFake + 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 HasherMock struct + func (sha *HasherMock) Compute(s string) []byte + func (sha *HasherMock) EmptyHash() []byte + func (sha *HasherMock) IsInterfaceNil() bool + func (sha *HasherMock) Size() int + 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 HeaderHandlerStub struct + GetEpochCaled func() uint32 + GetPrevRandSeedCalled func() []byte + GetRandSeedCalled func() []byte + IsStartOfEpochBlockCalled func() bool + func (hhs *HeaderHandlerStub) Clone() data.HeaderHandler + func (hhs *HeaderHandlerStub) GetAccumulatedFees() *big.Int + func (hhs *HeaderHandlerStub) GetChainID() []byte + func (hhs *HeaderHandlerStub) GetDeveloperFees() *big.Int + func (hhs *HeaderHandlerStub) GetEpoch() uint32 + func (hhs *HeaderHandlerStub) GetEpochStartMetaHash() []byte + func (hhs *HeaderHandlerStub) GetLeaderSignature() []byte + func (hhs *HeaderHandlerStub) GetMiniBlockHeadersWithDst(_ uint32) map[string]uint32 + func (hhs *HeaderHandlerStub) GetNonce() uint64 + func (hhs *HeaderHandlerStub) GetPrevHash() []byte + func (hhs *HeaderHandlerStub) GetPrevRandSeed() []byte + func (hhs *HeaderHandlerStub) GetPubKeysBitmap() []byte + func (hhs *HeaderHandlerStub) GetRandSeed() []byte + func (hhs *HeaderHandlerStub) GetReceiptsHash() []byte + func (hhs *HeaderHandlerStub) GetRootHash() []byte + func (hhs *HeaderHandlerStub) GetRound() uint64 + func (hhs *HeaderHandlerStub) GetShardID() uint32 + func (hhs *HeaderHandlerStub) GetSignature() []byte + func (hhs *HeaderHandlerStub) GetSoftwareVersion() []byte + func (hhs *HeaderHandlerStub) GetTimeStamp() uint64 + func (hhs *HeaderHandlerStub) GetTxCount() uint32 + func (hhs *HeaderHandlerStub) GetValidatorStatsRootHash() []byte + func (hhs *HeaderHandlerStub) IsInterfaceNil() bool + func (hhs *HeaderHandlerStub) IsStartOfEpochBlock() bool + func (hhs *HeaderHandlerStub) SetAccumulatedFees(_ *big.Int) + func (hhs *HeaderHandlerStub) SetChainID(_ []byte) + func (hhs *HeaderHandlerStub) SetDeveloperFees(_ *big.Int) + func (hhs *HeaderHandlerStub) SetEpoch(_ uint32) + func (hhs *HeaderHandlerStub) SetLeaderSignature(_ []byte) + func (hhs *HeaderHandlerStub) SetNonce(_ uint64) + func (hhs *HeaderHandlerStub) SetPrevHash(_ []byte) + func (hhs *HeaderHandlerStub) SetPrevRandSeed(_ []byte) + func (hhs *HeaderHandlerStub) SetPubKeysBitmap(_ []byte) + func (hhs *HeaderHandlerStub) SetRandSeed(_ []byte) + func (hhs *HeaderHandlerStub) SetRootHash(_ []byte) + func (hhs *HeaderHandlerStub) SetRound(_ uint64) + func (hhs *HeaderHandlerStub) SetShardID(_ uint32) + func (hhs *HeaderHandlerStub) SetSignature(_ []byte) + func (hhs *HeaderHandlerStub) SetSoftwareVersion(version []byte) + func (hhs *HeaderHandlerStub) SetTimeStamp(_ uint64) + func (hhs *HeaderHandlerStub) SetTxCount(_ uint32) + func (hhs *HeaderHandlerStub) SetValidatorStatsRootHash(_ []byte) + 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 NodeInfoMock struct + func NewNodeInfo(address []byte, pubKey []byte, shardId uint32) *NodeInfoMock + func (n *NodeInfoMock) Address() []byte + func (n *NodeInfoMock) AssignedShard() uint32 + func (n *NodeInfoMock) IsInterfaceNil() bool + func (n *NodeInfoMock) PubKey() []byte + 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 PubkeyConverterMock struct + func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock + func (pcm *PubkeyConverterMock) Decode(humanReadable string) ([]byte, error) + func (pcm *PubkeyConverterMock) Encode(pkBytes []byte) string + func (pcm *PubkeyConverterMock) IsInterfaceNil() bool + func (pcm *PubkeyConverterMock) Len() int + 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)) + type StorerMock struct + func NewStorerMock() *StorerMock + func (sm *StorerMock) ClearCache() + func (sm *StorerMock) Close() error + func (sm *StorerMock) DestroyUnit() error + func (sm *StorerMock) Get(key []byte) ([]byte, error) + func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error) + func (sm *StorerMock) Has(_ []byte) error + func (sm *StorerMock) HasInEpoch(_ []byte, _ uint32) error + func (sm *StorerMock) IsInterfaceNil() bool + func (sm *StorerMock) Put(key, data []byte) error + func (sm *StorerMock) Remove(_ []byte) error + func (sm *StorerMock) SearchFirst(key []byte) ([]byte, error) + type ValidatorMock struct + func NewValidatorMock(pubKey []byte, chances uint32, index uint32) *ValidatorMock + func (vm *ValidatorMock) Chances() uint32 + func (vm *ValidatorMock) Index() uint32 + func (vm *ValidatorMock) PubKey() []byte + func (vm *ValidatorMock) Size() int