Versions in this module Expand all Collapse all v1 v1.1.66 Jun 17, 2021 v1.1.65 Jun 17, 2021 Changes in this version + var ErrIntOverflowAccountWrapperMock = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthAccountWrapperMock = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrUnexpectedEndOfGroupAccountWrapperMock = fmt.Errorf("proto: unexpected end of group") + func NewNonceHashConverterMock() *nonceHashConverterMock + type AccountWrapMock struct + CodeHash []byte + CodeMetadata []byte + RootHash []byte + SetCodeHashWithJournalCalled func(codeHash []byte) error + SetCodeWithJournalCalled func([]byte) error + SetNonceWithJournalCalled func(nonce uint64) error + func NewAccountWrapMock(adr []byte) *AccountWrapMock + func (awm *AccountWrapMock) AddToBalance(_ *big.Int) error + func (awm *AccountWrapMock) AddToDeveloperReward(*big.Int) + func (awm *AccountWrapMock) AddressBytes() []byte + func (awm *AccountWrapMock) ChangeOwnerAddress([]byte, []byte) error + func (awm *AccountWrapMock) ClaimDeveloperRewards([]byte) (*big.Int, error) + func (awm *AccountWrapMock) DataTrie() data.Trie + func (awm *AccountWrapMock) DataTrieTracker() state.DataTrieTracker + func (awm *AccountWrapMock) GetBalance() *big.Int + func (awm *AccountWrapMock) GetCodeHash() []byte + func (awm *AccountWrapMock) GetCodeMetadata() []byte + func (awm *AccountWrapMock) GetDeveloperReward() *big.Int + func (awm *AccountWrapMock) GetNonce() uint64 + func (awm *AccountWrapMock) GetOwnerAddress() []byte + func (awm *AccountWrapMock) GetRootHash() []byte + func (awm *AccountWrapMock) GetUserName() []byte + func (awm *AccountWrapMock) HasNewCode() bool + func (awm *AccountWrapMock) IncreaseNonce(val uint64) + func (awm *AccountWrapMock) IsInterfaceNil() bool + func (awm *AccountWrapMock) SetCode(code []byte) + func (awm *AccountWrapMock) SetCodeHash(codeHash []byte) + func (awm *AccountWrapMock) SetCodeMetadata(codeMetadata []byte) + func (awm *AccountWrapMock) SetDataTrie(trie data.Trie) + func (awm *AccountWrapMock) SetOwnerAddress([]byte) + func (awm *AccountWrapMock) SetRootHash(rootHash []byte) + func (awm *AccountWrapMock) SetUserName(_ []byte) + func (awm *AccountWrapMock) SubFromBalance(_ *big.Int) error + type AccountWrapMockData struct + MockValue int64 + func (*AccountWrapMockData) Descriptor() ([]byte, []int) + func (*AccountWrapMockData) ProtoMessage() + func (m *AccountWrapMockData) GetMockValue() int64 + func (m *AccountWrapMockData) Marshal() (dAtA []byte, err error) + func (m *AccountWrapMockData) MarshalTo(dAtA []byte) (int, error) + func (m *AccountWrapMockData) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *AccountWrapMockData) Reset() + func (m *AccountWrapMockData) Size() (n int) + func (m *AccountWrapMockData) Unmarshal(dAtA []byte) error + func (m *AccountWrapMockData) XXX_DiscardUnknown() + func (m *AccountWrapMockData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *AccountWrapMockData) XXX_Merge(src proto.Message) + func (m *AccountWrapMockData) XXX_Size() int + func (m *AccountWrapMockData) XXX_Unmarshal(b []byte) error + func (this *AccountWrapMockData) Equal(that interface{}) bool + func (this *AccountWrapMockData) GoString() string + func (this *AccountWrapMockData) String() string + type AccountsFactoryStub struct + CreateAccountCalled func(address []byte) (state.AccountHandler, error) + func (afs *AccountsFactoryStub) CreateAccount(address []byte) (state.AccountHandler, error) + func (afs *AccountsFactoryStub) IsInterfaceNil() bool + 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 DataTrieTrackerStub struct + ClearDataCachesCalled func() + DataTrieCalled func() data.Trie + DirtyDataCalled func() map[string][]byte + RetrieveValueCalled func(key []byte) ([]byte, error) + SaveKeyValueCalled func(key []byte, value []byte) error + SetDataTrieCalled func(tr data.Trie) + func (dtts *DataTrieTrackerStub) ClearDataCaches() + func (dtts *DataTrieTrackerStub) DataTrie() data.Trie + func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte + func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool + func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, error) + func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte) error + func (dtts *DataTrieTrackerStub) SetDataTrie(tr data.Trie) + type EvictionWaitingList struct + Cache map[string]data.ModifiedHashes + CacheSize uint + Db storage.Persister + Marshalizer marshal.Marshalizer + OpMutex sync.RWMutex + func NewEvictionWaitingList(size uint, db storage.Persister, marshalizer marshal.Marshalizer) (*EvictionWaitingList, error) + func (ewl *EvictionWaitingList) Evict(rootHash []byte) (data.ModifiedHashes, error) + func (ewl *EvictionWaitingList) IsInterfaceNil() bool + func (ewl *EvictionWaitingList) Put(rootHash []byte, hashes data.ModifiedHashes) error + func (ewl *EvictionWaitingList) ShouldKeepHash(hash string, identifier data.TriePruningIdentifier) (bool, error) + 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 + 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 + func (scm *MultipleShardsCoordinatorMock) SetNoShards(noShards uint32) + func (scm *MultipleShardsCoordinatorMock) SetSelfId(_ uint32) error + type PathManagerStub struct + PathForEpochCalled func(shardId string, epoch uint32, identifier string) string + PathForStaticCalled func(shardId string, identifier string) string + func (p *PathManagerStub) IsInterfaceNil() bool + func (p *PathManagerStub) PathForEpoch(shardId string, epoch uint32, identifier string) string + func (p *PathManagerStub) PathForStatic(shardId string, identifier string) string + 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 StorageManagerStub struct + CancelPruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier) + DatabaseCalled func() data.DBWriteCacher + EnterPruningBufferingModeCalled func() + ExitPruningBufferingModeCalled func() + GetDbThatContainsHashCalled func([]byte) data.DBWriteCacher + GetSnapshotThatContainsHashCalled func(rootHash []byte) data.SnapshotDbHandler + IsInterfaceNilCalled func() bool + IsPruningEnabledCalled func() bool + MarkForEvictionCalled func([]byte, data.ModifiedHashes) error + PruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier) + SetCheckpointCalled func([]byte) + TakeSnapshotCalled func([]byte) + func (sms *StorageManagerStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier) + func (sms *StorageManagerStub) Database() data.DBWriteCacher + func (sms *StorageManagerStub) EnterPruningBufferingMode() + func (sms *StorageManagerStub) ExitPruningBufferingMode() + func (sms *StorageManagerStub) GetSnapshotDbBatchDelay() int + func (sms *StorageManagerStub) GetSnapshotThatContainsHash(d []byte) data.SnapshotDbHandler + func (sms *StorageManagerStub) IsInterfaceNil() bool + func (sms *StorageManagerStub) IsPruningEnabled() bool + func (sms *StorageManagerStub) MarkForEviction(d []byte, m data.ModifiedHashes) error + func (sms *StorageManagerStub) Prune(rootHash []byte, identifier data.TriePruningIdentifier) + func (sms *StorageManagerStub) SetCheckpoint(rootHash []byte) + func (sms *StorageManagerStub) TakeSnapshot(rootHash []byte) + 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) + HasCalled func(key []byte) error + HasInEpochCalled func(key []byte, epoch uint32) error + PutCalled func(key, data []byte) error + PutInEpochCalled func(key, data []byte) 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) Has(key []byte) error + func (ss *StorerStub) HasInEpoch(key []byte, epoch uint32) 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 TrieNodesResolverStub struct + ProcessReceivedMessageCalled func(message p2p.MessageP2P) error + RequestDataFromHashCalled func(hash []byte) error + func (tnrs *TrieNodesResolverStub) IsInterfaceNil() bool + func (tnrs *TrieNodesResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error + func (tnrs *TrieNodesResolverStub) RequestDataFromHash(hash []byte, _ uint32) error + type TrieStub struct + AppendToOldHashesCalled func([][]byte) + ClosePersisterCalled func() error + CommitCalled func() error + DeleteCalled func(key []byte) error + GetAllHashesCalled func() ([][]byte, error) + GetAllLeavesOnChannelCalled func(rootHash []byte) (chan core.KeyValueHolder, error) + GetCalled func(key []byte) ([]byte, error) + GetNumNodesCalled func() data.NumNodesDTO + GetProofCalled func(key []byte) ([][]byte, error) + GetSerializedNodeCalled func(hash []byte) ([]byte, error) + GetSerializedNodesCalled func([]byte, uint64) ([][]byte, uint64, error) + GetStorageManagerCalled func() data.StorageManager + RecreateCalled func(root []byte) (data.Trie, error) + ResetOldHashesCalled func() [][]byte + RootCalled func() ([]byte, error) + UpdateCalled func(key, value []byte) error + VerifyProofCalled func(key []byte, proof [][]byte) (bool, error) + func (ts *TrieStub) AppendToOldHashes(hashes [][]byte) + func (ts *TrieStub) ClosePersister() error + func (ts *TrieStub) Commit() error + func (ts *TrieStub) Delete(key []byte) error + func (ts *TrieStub) Get(key []byte) ([]byte, error) + func (ts *TrieStub) GetAllHashes() ([][]byte, error) + func (ts *TrieStub) GetAllLeavesOnChannel(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error) + func (ts *TrieStub) GetDirtyHashes() (data.ModifiedHashes, error) + func (ts *TrieStub) GetNumNodes() data.NumNodesDTO + func (ts *TrieStub) GetProof(key []byte) ([][]byte, error) + func (ts *TrieStub) GetSerializedNode(hash []byte) ([]byte, error) + func (ts *TrieStub) GetSerializedNodes(hash []byte, maxBuffToSend uint64) ([][]byte, uint64, error) + func (ts *TrieStub) GetStorageManager() data.StorageManager + func (ts *TrieStub) IsInterfaceNil() bool + func (ts *TrieStub) Recreate(root []byte) (data.Trie, error) + func (ts *TrieStub) ResetOldHashes() [][]byte + func (ts *TrieStub) RootHash() ([]byte, error) + func (ts *TrieStub) SetNewHashes(_ data.ModifiedHashes) + func (ts *TrieStub) String() string + func (ts *TrieStub) Update(key, value []byte) error + func (ts *TrieStub) VerifyProof(key []byte, proof [][]byte) (bool, error) + type UnsignedTxHandlerMock struct + AddTxFeeFromBlockCalled func(tx data.TransactionHandler) + CleanProcessedUtxsCalled func() + CreateAllUTxsCalled func() []data.TransactionHandler + ProcessTransactionFeeCalled func(cost *big.Int, hash []byte) + VerifyCreatedUTxsCalled func() error + func (ut *UnsignedTxHandlerMock) AddRewardTxFromBlock(tx data.TransactionHandler) + func (ut *UnsignedTxHandlerMock) CleanProcessedUTxs() + func (ut *UnsignedTxHandlerMock) CreateAllUTxs() []data.TransactionHandler + func (ut *UnsignedTxHandlerMock) ProcessTransactionFee(cost *big.Int, hash []byte) + func (ut *UnsignedTxHandlerMock) VerifyCreatedUTxs() error + type UpdaterStub struct + UpdateCalled func(key, value []byte) error + func (updater *UpdaterStub) IsInterfaceNil() bool + func (updater *UpdaterStub) Update(key, value []byte) error