Versions in this module Expand all Collapse all v1 v1.999.0 Nov 17, 2022 Changes in this version + func NewNonceHashConverterMock() *nonceHashConverterMock + type AppStatusHandlerStub struct + AddUint64Handler func(key string, value uint64) + CloseHandler func() + DecrementHandler func(key string) + IncrementHandler func(key string) + SetInt64ValueHandler func(key string, value int64) + SetStringValueHandler func(key string, value string) + SetUInt64ValueHandler func(key string, value uint64) + func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64) + func (ashs *AppStatusHandlerStub) Close() + func (ashs *AppStatusHandlerStub) Decrement(key string) + func (ashs *AppStatusHandlerStub) Increment(key string) + func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool + func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64) + func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string) + func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64) + type CacherMock struct + func NewCacherMock() *CacherMock + func (cacher *CacherMock) Clear() + func (cacher *CacherMock) Close() error + func (cacher *CacherMock) Get(key []byte) (value interface{}, ok bool) + func (cacher *CacherMock) Has(key []byte) bool + func (cacher *CacherMock) HasOrAdd(key []byte, value interface{}, _ int) (has, added bool) + func (cacher *CacherMock) IsInterfaceNil() bool + func (cacher *CacherMock) Keys() [][]byte + func (cacher *CacherMock) Len() int + func (cacher *CacherMock) MaxSize() int + func (cacher *CacherMock) Peek(key []byte) (value interface{}, ok bool) + func (cacher *CacherMock) Put(key []byte, value interface{}, _ int) (evicted bool) + func (cacher *CacherMock) RegisterHandler(handler func(key []byte, value interface{}), _ string) + func (cacher *CacherMock) Remove(key []byte) + func (cacher *CacherMock) SizeInBytesContained() uint64 + func (cacher *CacherMock) UnRegisterHandler(string) + type HasherMock struct + func (HasherMock) Size() int + func (sha HasherMock) Compute(s string) []byte + func (sha HasherMock) EmptyHash() []byte + func (sha HasherMock) IsInterfaceNil() bool + type HasherMock127 struct + func (HasherMock127) Compute(s string) []byte + func (HasherMock127) EmptyHash() []byte + func (HasherMock127) Size() int + func (hash *HasherMock127) IsInterfaceNil() bool + type KeccakMock struct + func (KeccakMock) Size() int + func (k *KeccakMock) IsInterfaceNil() bool + func (k KeccakMock) Compute(s string) []byte + func (k KeccakMock) EmptyHash() []byte + type MarshalizerMock struct + Fail bool + func (*MarshalizerMock) Version() string + func (mm *MarshalizerMock) IsInterfaceNil() bool + func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error) + func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error + type MarshalizerStub struct + MarshalCalled func(obj interface{}) ([]byte, error) + UnmarshalCalled func(obj interface{}, buff []byte) error + func (ms *MarshalizerStub) IsInterfaceNil() bool + func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error) + func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error + type MemDbMock struct + PutCalled func(key, val []byte) error + func NewMemDbMock() *MemDbMock + func (s *MemDbMock) Close() error + func (s *MemDbMock) Destroy() error + func (s *MemDbMock) DestroyClosed() error + func (s *MemDbMock) Get(key []byte) ([]byte, error) + func (s *MemDbMock) Has(key []byte) error + func (s *MemDbMock) Init() error + func (s *MemDbMock) IsInterfaceNil() bool + func (s *MemDbMock) Put(key, val []byte) error + func (s *MemDbMock) RangeKeys(handler func(key []byte, value []byte) bool) + func (s *MemDbMock) Remove(key []byte) error + type MultipleShardsCoordinatorMock struct + ComputeIdCalled func(address []byte) uint32 + CurrentShard uint32 + NoShards uint32 + func NewMultiShardsCoordinatorMock(nrShard uint32) *MultipleShardsCoordinatorMock + func (scm *MultipleShardsCoordinatorMock) CommunicationIdentifier(destShardID uint32) string + func (scm *MultipleShardsCoordinatorMock) ComputeId(address []byte) uint32 + func (scm *MultipleShardsCoordinatorMock) IsInterfaceNil() bool + func (scm *MultipleShardsCoordinatorMock) NumberOfShards() uint32 + func (scm *MultipleShardsCoordinatorMock) SameShard(_, _ []byte) bool + func (scm *MultipleShardsCoordinatorMock) SelfId() uint32 + type ProtobufMarshalizerMock struct + func (x *ProtobufMarshalizerMock) IsInterfaceNil() bool + func (x *ProtobufMarshalizerMock) Marshal(obj interface{}) ([]byte, error) + func (x *ProtobufMarshalizerMock) Unmarshal(obj interface{}, buff []byte) error + type PubkeyConverterStub struct + DecodeCalled func(humanReadable string) ([]byte, error) + EncodeCalled func(pkBytes []byte) string + LenCalled func() int + func (pcs *PubkeyConverterStub) Decode(humanReadable string) ([]byte, error) + func (pcs *PubkeyConverterStub) Encode(pkBytes []byte) string + func (pcs *PubkeyConverterStub) IsInterfaceNil() bool + func (pcs *PubkeyConverterStub) Len() int + type RequestHandlerStub struct + RequestMetaHeaderByNonceCalled func(nonce uint64) + RequestMetaHeaderCalled func(hash []byte) + RequestMiniBlockHandlerCalled func(destShardID uint32, miniblockHash []byte) + RequestMiniBlocksHandlerCalled func(destShardID uint32, miniblocksHashes [][]byte) + RequestRewardTxHandlerCalled func(destShardID uint32, txHashes [][]byte) + RequestScrHandlerCalled func(destShardID uint32, txHashes [][]byte) + RequestShardHeaderByNonceCalled func(shardID uint32, nonce uint64) + RequestShardHeaderCalled func(shardID uint32, hash []byte) + RequestStartOfEpochMetaBlockCalled func(epoch uint32) + RequestTransactionHandlerCalled func(destShardID uint32, txHashes [][]byte) + RequestTrieNodesCalled func(destShardID uint32, hashes [][]byte, topic string) + func (rhs *RequestHandlerStub) IsInterfaceNil() bool + func (rhs *RequestHandlerStub) RequestInterval() time.Duration + func (rhs *RequestHandlerStub) RequestMetaHeader(hash []byte) + func (rhs *RequestHandlerStub) RequestMetaHeaderByNonce(nonce uint64) + func (rhs *RequestHandlerStub) RequestMiniBlock(destShardID uint32, miniblockHash []byte) + func (rhs *RequestHandlerStub) RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte) + func (rhs *RequestHandlerStub) RequestRewardTransactions(destShardID uint32, txHashes [][]byte) + func (rhs *RequestHandlerStub) RequestShardHeader(shardID uint32, hash []byte) + func (rhs *RequestHandlerStub) RequestShardHeaderByNonce(shardID uint32, nonce uint64) + func (rhs *RequestHandlerStub) RequestStartOfEpochMetaBlock(epoch uint32) + func (rhs *RequestHandlerStub) RequestTransaction(destShardID uint32, txHashes [][]byte) + func (rhs *RequestHandlerStub) RequestTrieNodes(destShardID uint32, hashes [][]byte, topic string) + func (rhs *RequestHandlerStub) RequestUnsignedTransactions(destShardID uint32, txHashes [][]byte) + func (rhs *RequestHandlerStub) SetEpoch(_ uint32) + type ShardCoordinatorMock struct + NrOfShards uint32 + SelfID uint32 + func (scm *ShardCoordinatorMock) IsInterfaceNil() bool + func (scm ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string + func (scm ShardCoordinatorMock) ComputeId(_ []byte) uint32 + func (scm ShardCoordinatorMock) NumberOfShards() uint32 + func (scm ShardCoordinatorMock) SameShard(_, _ []byte) bool + func (scm ShardCoordinatorMock) SelfId() uint32 + func (scm ShardCoordinatorMock) SetSelfId(_ uint32) error + type StorerStub struct + ClearCacheCalled func() + CloseCalled func() error + DestroyUnitCalled func() error + GetBulkFromEpochCalled func(keys [][]byte, epoch uint32) (map[string][]byte, error) + GetCalled func(key []byte) ([]byte, error) + GetFromEpochCalled func(key []byte, epoch uint32) ([]byte, error) + GetOldestEpochCalled func() (uint32, error) + HasCalled func(key []byte) error + HasInEpochCalled func(key []byte, epoch uint32) error + PutCalled func(key, data []byte) error + PutInEpochCalled func(key, data []byte, epoch uint32) error + RangeKeysCalled func(handler func(key []byte, val []byte) bool) + RemoveCalled func(key []byte) error + SearchFirstCalled func(key []byte) ([]byte, error) + func (ss *StorerStub) ClearCache() + func (ss *StorerStub) Close() error + func (ss *StorerStub) DestroyUnit() error + func (ss *StorerStub) Get(key []byte) ([]byte, error) + func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) (map[string][]byte, error) + func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error) + func (ss *StorerStub) GetOldestEpoch() (uint32, error) + func (ss *StorerStub) Has(key []byte) error + func (ss *StorerStub) IsInterfaceNil() bool + func (ss *StorerStub) Put(key, data []byte) error + func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error + func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool) + func (ss *StorerStub) Remove(key []byte) error + func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error) + type UpdaterStub struct + UpdateCalled func(key, value []byte) error + func (updater *UpdaterStub) IsInterfaceNil() bool + func (updater *UpdaterStub) Update(key, value []byte) error