Documentation ¶
Index ¶
- func NewNonceHashConverterMock() *nonceHashConverterMock
- type AccountTrackerStub
- type AccountWrapMock
- func (awm *AccountWrapMock) AddressContainer() state.AddressContainer
- func (awm *AccountWrapMock) DataTrie() data.Trie
- func (awm *AccountWrapMock) DataTrieTracker() state.DataTrieTracker
- func (awm *AccountWrapMock) GetCode() []byte
- func (awm *AccountWrapMock) GetCodeHash() []byte
- func (awm *AccountWrapMock) GetNonce() uint64
- func (awm *AccountWrapMock) GetRootHash() []byte
- func (awm *AccountWrapMock) IsInterfaceNil() bool
- func (awm *AccountWrapMock) SetCode(code []byte)
- func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
- func (awm *AccountWrapMock) SetCodeHashWithJournal(codeHash []byte) error
- func (awm *AccountWrapMock) SetDataTrie(trie data.Trie)
- func (awm *AccountWrapMock) SetDataTrieTracker(tracker state.DataTrieTracker)
- func (awm *AccountWrapMock) SetNonce(nonce uint64)
- func (awm *AccountWrapMock) SetNonceWithJournal(nonce uint64) error
- func (awm *AccountWrapMock) SetRootHash(rootHash []byte)
- func (awm *AccountWrapMock) SetRootHashWithJournal(rootHash []byte) error
- type AccountsFactoryStub
- type AddressDummy
- type AddressMock
- type CacherStub
- func (cs *CacherStub) Clear()
- func (cs *CacherStub) Get(key []byte) (value interface{}, ok bool)
- func (cs *CacherStub) Has(key []byte) bool
- func (cs *CacherStub) HasOrAdd(key []byte, value interface{}) (ok, evicted bool)
- func (cs *CacherStub) IsInterfaceNil() bool
- func (cs *CacherStub) Keys() [][]byte
- func (cs *CacherStub) Len() int
- func (cs *CacherStub) Peek(key []byte) (value interface{}, ok bool)
- func (cs *CacherStub) Put(key []byte, value interface{}) (evicted bool)
- func (cs *CacherStub) RegisterHandler(handler func(key []byte))
- func (cs *CacherStub) Remove(key []byte)
- func (cs *CacherStub) RemoveOldest()
- type DataTrieTrackerStub
- 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) OriginalValue(key []byte) []byte
- func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, error)
- func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte)
- func (dtts *DataTrieTrackerStub) SetDataTrie(tr data.Trie)
- type HasherMock
- type HasherMock127
- type KeccakMock
- type MarshalizerMock
- type MemDbMock
- func (s *MemDbMock) Close() error
- func (s *MemDbMock) Destroy() error
- func (s *MemDbMock) Get(key []byte) ([]byte, error)
- func (s *MemDbMock) Has(key []byte) (bool, error)
- func (s *MemDbMock) Init() error
- func (s *MemDbMock) IsInterfaceNil() bool
- func (s *MemDbMock) Put(key, val []byte) error
- func (s *MemDbMock) Remove(key []byte) error
- type ProtobufMarshalizerMock
- type ShardCoordinatorMock
- func (scm ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
- func (scm ShardCoordinatorMock) ComputeId(address state.AddressContainer) uint32
- func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
- func (scm ShardCoordinatorMock) NumberOfShards() uint32
- func (scm ShardCoordinatorMock) SameShard(firstAddress, secondAddress state.AddressContainer) bool
- func (scm ShardCoordinatorMock) SelfId() uint32
- func (scm ShardCoordinatorMock) SetSelfId(shardId uint32) error
- type ShardedDataStub
- func (sd *ShardedDataStub) AddData(key []byte, data interface{}, cacheId string)
- func (sd *ShardedDataStub) Clear()
- func (sd *ShardedDataStub) ClearShardStore(cacheId string)
- func (sd *ShardedDataStub) CreateShardStore(cacheId string)
- func (sd *ShardedDataStub) IsInterfaceNil() bool
- func (sd *ShardedDataStub) MergeShardStores(sourceCacheId, destCacheId string)
- func (sd *ShardedDataStub) MoveData(sourceCacheId, destCacheId string, key [][]byte)
- func (sd *ShardedDataStub) RegisterHandler(handler func(key []byte))
- func (sd *ShardedDataStub) RemoveData(key []byte, cacheId string)
- func (sd *ShardedDataStub) RemoveDataFromAllShards(key []byte)
- func (sd *ShardedDataStub) RemoveSetOfDataFromPool(keys [][]byte, cacheId string)
- func (sd *ShardedDataStub) SearchFirstData(key []byte) (value interface{}, ok bool)
- func (sd *ShardedDataStub) ShardDataStore(cacheId string) (c storage.Cacher)
- type StorerStub
- func (ss *StorerStub) ClearCache()
- func (ss *StorerStub) DestroyUnit() error
- func (ss *StorerStub) Get(key []byte) ([]byte, error)
- func (ss *StorerStub) Has(key []byte) error
- func (ss *StorerStub) HasOrAdd(key []byte, value []byte) error
- func (ss *StorerStub) IsInterfaceNil() bool
- func (ss *StorerStub) Put(key, data []byte) error
- func (ss *StorerStub) Remove(key []byte) error
- type TrieStub
- func (ts *TrieStub) Commit() error
- func (ts *TrieStub) DeepClone() (data.Trie, error)
- func (ts *TrieStub) Delete(key []byte) error
- func (ts *TrieStub) Get(key []byte) ([]byte, error)
- func (ts *TrieStub) IsInterfaceNil() bool
- func (ts *TrieStub) Prove(key []byte) ([][]byte, error)
- func (ts *TrieStub) Recreate(root []byte) (data.Trie, error)
- func (ts *TrieStub) Root() ([]byte, error)
- func (ts *TrieStub) String() string
- func (ts *TrieStub) Update(key, value []byte) error
- func (ts *TrieStub) VerifyProof(proofs [][]byte, key []byte) (bool, error)
- type Uint64CacherStub
- func (ucs *Uint64CacherStub) Clear()
- func (ucs *Uint64CacherStub) Get(nonce uint64) (interface{}, bool)
- func (ucs *Uint64CacherStub) Has(nonce uint64) bool
- func (ucs *Uint64CacherStub) HasOrAdd(nonce uint64, value interface{}) (bool, bool)
- func (ucs *Uint64CacherStub) Keys() []uint64
- func (ucs *Uint64CacherStub) Len() int
- func (ucs *Uint64CacherStub) Peek(nonce uint64) (interface{}, bool)
- func (ucs *Uint64CacherStub) Put(nonce uint64, value interface{}) bool
- func (ucs *Uint64CacherStub) RegisterHandler(handler func(nonce uint64))
- func (ucs *Uint64CacherStub) Remove(nonce uint64)
- func (ucs *Uint64CacherStub) RemoveOldest()
- type UpdaterStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNonceHashConverterMock ¶ added in v1.0.3
func NewNonceHashConverterMock() *nonceHashConverterMock
Types ¶
type AccountTrackerStub ¶ added in v1.0.3
type AccountTrackerStub struct { SaveAccountCalled func(accountHandler state.AccountHandler) error JournalizeCalled func(entry state.JournalEntry) }
func (*AccountTrackerStub) IsInterfaceNil ¶ added in v1.0.16
func (ats *AccountTrackerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AccountTrackerStub) Journalize ¶ added in v1.0.3
func (ats *AccountTrackerStub) Journalize(entry state.JournalEntry)
func (*AccountTrackerStub) SaveAccount ¶ added in v1.0.3
func (ats *AccountTrackerStub) SaveAccount(accountHandler state.AccountHandler) error
type AccountWrapMock ¶
type AccountWrapMock struct { MockValue int SetNonceWithJournalCalled func(nonce uint64) error `json:"-"` SetCodeHashWithJournalCalled func(codeHash []byte) error `json:"-"` SetRootHashWithJournalCalled func([]byte) error `json:"-"` SetCodeWithJournalCalled func([]byte) error `json:"-"` // contains filtered or unexported fields }
func NewAccountWrapMock ¶
func NewAccountWrapMock(adr state.AddressContainer, tracker state.AccountTracker) *AccountWrapMock
func (*AccountWrapMock) AddressContainer ¶
func (awm *AccountWrapMock) AddressContainer() state.AddressContainer
func (*AccountWrapMock) DataTrie ¶
func (awm *AccountWrapMock) DataTrie() data.Trie
func (*AccountWrapMock) DataTrieTracker ¶
func (awm *AccountWrapMock) DataTrieTracker() state.DataTrieTracker
func (*AccountWrapMock) GetCode ¶
func (awm *AccountWrapMock) GetCode() []byte
func (*AccountWrapMock) GetCodeHash ¶
func (awm *AccountWrapMock) GetCodeHash() []byte
func (*AccountWrapMock) GetNonce ¶
func (awm *AccountWrapMock) GetNonce() uint64
GetNonce gets the nonce of the account
func (*AccountWrapMock) GetRootHash ¶
func (awm *AccountWrapMock) GetRootHash() []byte
func (*AccountWrapMock) IsInterfaceNil ¶
func (awm *AccountWrapMock) IsInterfaceNil() bool
func (*AccountWrapMock) SetCode ¶
func (awm *AccountWrapMock) SetCode(code []byte)
func (*AccountWrapMock) SetCodeHash ¶
func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
func (*AccountWrapMock) SetCodeHashWithJournal ¶ added in v1.0.3
func (awm *AccountWrapMock) SetCodeHashWithJournal(codeHash []byte) error
func (*AccountWrapMock) SetDataTrie ¶
func (awm *AccountWrapMock) SetDataTrie(trie data.Trie)
func (*AccountWrapMock) SetDataTrieTracker ¶ added in v1.0.3
func (awm *AccountWrapMock) SetDataTrieTracker(tracker state.DataTrieTracker)
func (*AccountWrapMock) SetNonce ¶ added in v1.0.3
func (awm *AccountWrapMock) SetNonce(nonce uint64)
SetNonce saves the nonce to the account
func (*AccountWrapMock) SetNonceWithJournal ¶ added in v1.0.3
func (awm *AccountWrapMock) SetNonceWithJournal(nonce uint64) error
SetNonceWithJournal sets the account's nonce, saving the old nonce before changing
func (*AccountWrapMock) SetRootHash ¶
func (awm *AccountWrapMock) SetRootHash(rootHash []byte)
func (*AccountWrapMock) SetRootHashWithJournal ¶ added in v1.0.3
func (awm *AccountWrapMock) SetRootHashWithJournal(rootHash []byte) error
type AccountsFactoryStub ¶
type AccountsFactoryStub struct {
CreateAccountCalled func(address state.AddressContainer, tracker state.AccountTracker) (state.AccountHandler, error)
}
func (*AccountsFactoryStub) CreateAccount ¶
func (afs *AccountsFactoryStub) CreateAccount(address state.AddressContainer, tracker state.AccountTracker) (state.AccountHandler, error)
func (*AccountsFactoryStub) IsInterfaceNil ¶
func (afs *AccountsFactoryStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type AddressDummy ¶
type AddressDummy struct {
// contains filtered or unexported fields
}
func NewAddressDummy ¶
func NewAddressDummy(bytes, hash []byte) *AddressDummy
func (*AddressDummy) Bytes ¶
func (ad *AddressDummy) Bytes() []byte
func (*AddressDummy) Hash ¶
func (ad *AddressDummy) Hash() []byte
func (*AddressDummy) IsInterfaceNil ¶
func (ad *AddressDummy) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type AddressMock ¶
type AddressMock struct {
// contains filtered or unexported fields
}
AddressMock implements a mock address generator used in testing
func NewAddressMockFromBytes ¶
func NewAddressMockFromBytes(buff []byte) *AddressMock
NewAddressMockFromBytes generates a new address
func (*AddressMock) Bytes ¶
func (address *AddressMock) Bytes() []byte
Bytes returns the address' bytes
func (*AddressMock) IsInterfaceNil ¶
func (address *AddressMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type CacherStub ¶ added in v1.0.3
type CacherStub struct { ClearCalled func() PutCalled func(key []byte, value interface{}) (evicted bool) GetCalled func(key []byte) (value interface{}, ok bool) HasCalled func(key []byte) bool PeekCalled func(key []byte) (value interface{}, ok bool) HasOrAddCalled func(key []byte, value interface{}) (ok, evicted bool) RemoveCalled func(key []byte) RemoveOldestCalled func() KeysCalled func() [][]byte LenCalled func() int RegisterHandlerCalled func(func(key []byte)) }
func (*CacherStub) Clear ¶ added in v1.0.3
func (cs *CacherStub) Clear()
func (*CacherStub) Get ¶ added in v1.0.3
func (cs *CacherStub) Get(key []byte) (value interface{}, ok bool)
func (*CacherStub) Has ¶ added in v1.0.3
func (cs *CacherStub) Has(key []byte) bool
func (*CacherStub) HasOrAdd ¶ added in v1.0.3
func (cs *CacherStub) HasOrAdd(key []byte, value interface{}) (ok, evicted bool)
func (*CacherStub) IsInterfaceNil ¶ added in v1.0.16
func (cs *CacherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*CacherStub) Keys ¶ added in v1.0.3
func (cs *CacherStub) Keys() [][]byte
func (*CacherStub) Len ¶ added in v1.0.3
func (cs *CacherStub) Len() int
func (*CacherStub) Peek ¶ added in v1.0.3
func (cs *CacherStub) Peek(key []byte) (value interface{}, ok bool)
func (*CacherStub) Put ¶ added in v1.0.3
func (cs *CacherStub) Put(key []byte, value interface{}) (evicted bool)
func (*CacherStub) RegisterHandler ¶ added in v1.0.3
func (cs *CacherStub) RegisterHandler(handler func(key []byte))
func (*CacherStub) Remove ¶ added in v1.0.3
func (cs *CacherStub) Remove(key []byte)
func (*CacherStub) RemoveOldest ¶ added in v1.0.3
func (cs *CacherStub) RemoveOldest()
type DataTrieTrackerStub ¶
type DataTrieTrackerStub struct { ClearDataCachesCalled func() DirtyDataCalled func() map[string][]byte OriginalValueCalled func(key []byte) []byte RetrieveValueCalled func(key []byte) ([]byte, error) SaveKeyValueCalled func(key []byte, value []byte) SetDataTrieCalled func(tr data.Trie) DataTrieCalled func() data.Trie }
func (*DataTrieTrackerStub) ClearDataCaches ¶
func (dtts *DataTrieTrackerStub) ClearDataCaches()
func (*DataTrieTrackerStub) DataTrie ¶
func (dtts *DataTrieTrackerStub) DataTrie() data.Trie
func (*DataTrieTrackerStub) DirtyData ¶
func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte
func (*DataTrieTrackerStub) IsInterfaceNil ¶
func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*DataTrieTrackerStub) OriginalValue ¶
func (dtts *DataTrieTrackerStub) OriginalValue(key []byte) []byte
func (*DataTrieTrackerStub) RetrieveValue ¶
func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, error)
func (*DataTrieTrackerStub) SaveKeyValue ¶
func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte)
func (*DataTrieTrackerStub) SetDataTrie ¶
func (dtts *DataTrieTrackerStub) SetDataTrie(tr data.Trie)
type HasherMock ¶
type HasherMock struct { }
HasherMock that will be used for testing
func (HasherMock) Compute ¶
func (sha HasherMock) Compute(s string) []byte
Compute will output the SHA's equivalent of the input string
func (HasherMock) EmptyHash ¶
func (sha HasherMock) EmptyHash() []byte
EmptyHash will return the equivalent of empty string SHA's
func (*HasherMock) IsInterfaceNil ¶
func (sha *HasherMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HasherMock127 ¶
type HasherMock127 struct { }
func (HasherMock127) Compute ¶
func (HasherMock127) Compute(s string) []byte
func (HasherMock127) EmptyHash ¶
func (HasherMock127) EmptyHash() []byte
func (*HasherMock127) IsInterfaceNil ¶
func (hash *HasherMock127) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (HasherMock127) Size ¶
func (HasherMock127) Size() int
type KeccakMock ¶
type KeccakMock struct { }
KeccakMock is a sha3-Keccak implementation of the hasher interface.
func (KeccakMock) Compute ¶
func (k KeccakMock) Compute(s string) []byte
Compute takes a string, and returns the sha3-Keccak hash of that string
func (KeccakMock) EmptyHash ¶
func (k KeccakMock) EmptyHash() []byte
EmptyHash returns the sha3-Keccak hash of the empty string
func (*KeccakMock) IsInterfaceNil ¶
func (k *KeccakMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (KeccakMock) Size ¶
func (KeccakMock) Size() int
Size returns the size, in number of bytes, of a sha3-Keccak hash
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
func (*MarshalizerMock) Version ¶
func (*MarshalizerMock) Version() string
Version is deprecated and will be removed
type MemDbMock ¶
type MemDbMock struct {
// contains filtered or unexported fields
}
MemDbMock represents the memory database storage. It holds a map of key value pairs and a mutex to handle concurrent accesses to the map
func NewMemDbMock ¶
NewMemDbMock creates a new memorydb object
func (*MemDbMock) Has ¶
Has returns true if the given key is present in the persistence medium, false otherwise
func (*MemDbMock) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
type ProtobufMarshalizerMock ¶
type ProtobufMarshalizerMock struct { }
ProtobufMarshalizer implements marshaling with protobuf
func (*ProtobufMarshalizerMock) IsInterfaceNil ¶
func (x *ProtobufMarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ProtobufMarshalizerMock) Marshal ¶
func (x *ProtobufMarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal does the actual serialization of an object through capnproto The object to be serialized must implement the data.CapnpHelper interface
func (*ProtobufMarshalizerMock) Unmarshal ¶
func (x *ProtobufMarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal does the actual deserialization of an object through capnproto The object to be deserialized must implement the data.CapnpHelper interface
type ShardCoordinatorMock ¶
func (ShardCoordinatorMock) CommunicationIdentifier ¶
func (scm ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
func (ShardCoordinatorMock) ComputeId ¶
func (scm ShardCoordinatorMock) ComputeId(address state.AddressContainer) uint32
func (*ShardCoordinatorMock) IsInterfaceNil ¶
func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (ShardCoordinatorMock) NumberOfShards ¶
func (scm ShardCoordinatorMock) NumberOfShards() uint32
func (ShardCoordinatorMock) SameShard ¶
func (scm ShardCoordinatorMock) SameShard(firstAddress, secondAddress state.AddressContainer) bool
func (ShardCoordinatorMock) SelfId ¶
func (scm ShardCoordinatorMock) SelfId() uint32
func (ShardCoordinatorMock) SetSelfId ¶
func (scm ShardCoordinatorMock) SetSelfId(shardId uint32) error
type ShardedDataStub ¶
type ShardedDataStub struct { RegisterHandlerCalled func(func(key []byte)) ShardDataStoreCalled func(cacheId string) (c storage.Cacher) AddDataCalled func(key []byte, data interface{}, cacheId string) SearchFirstDataCalled func(key []byte) (value interface{}, ok bool) RemoveDataCalled func(key []byte, cacheId string) RemoveDataFromAllShardsCalled func(key []byte) MergeShardStoresCalled func(sourceCacheId, destCacheId string) MoveDataCalled func(sourceCacheId, destCacheId string, key [][]byte) ClearCalled func() ClearShardStoreCalled func(cacheId string) RemoveSetOfDataFromPoolCalled func(keys [][]byte, destCacheId string) CreateShardStoreCalled func(destCacheId string) }
func (*ShardedDataStub) AddData ¶
func (sd *ShardedDataStub) AddData(key []byte, data interface{}, cacheId string)
func (*ShardedDataStub) Clear ¶
func (sd *ShardedDataStub) Clear()
func (*ShardedDataStub) ClearShardStore ¶
func (sd *ShardedDataStub) ClearShardStore(cacheId string)
func (*ShardedDataStub) CreateShardStore ¶
func (sd *ShardedDataStub) CreateShardStore(cacheId string)
func (*ShardedDataStub) IsInterfaceNil ¶
func (sd *ShardedDataStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardedDataStub) MergeShardStores ¶
func (sd *ShardedDataStub) MergeShardStores(sourceCacheId, destCacheId string)
func (*ShardedDataStub) MoveData ¶ added in v1.0.3
func (sd *ShardedDataStub) MoveData(sourceCacheId, destCacheId string, key [][]byte)
func (*ShardedDataStub) RegisterHandler ¶
func (sd *ShardedDataStub) RegisterHandler(handler func(key []byte))
func (*ShardedDataStub) RemoveData ¶
func (sd *ShardedDataStub) RemoveData(key []byte, cacheId string)
func (*ShardedDataStub) RemoveDataFromAllShards ¶
func (sd *ShardedDataStub) RemoveDataFromAllShards(key []byte)
func (*ShardedDataStub) RemoveSetOfDataFromPool ¶
func (sd *ShardedDataStub) RemoveSetOfDataFromPool(keys [][]byte, cacheId string)
func (*ShardedDataStub) SearchFirstData ¶
func (sd *ShardedDataStub) SearchFirstData(key []byte) (value interface{}, ok bool)
func (*ShardedDataStub) ShardDataStore ¶
func (sd *ShardedDataStub) ShardDataStore(cacheId string) (c storage.Cacher)
type StorerStub ¶
type StorerStub struct { PutCalled func(key, data []byte) error GetCalled func(key []byte) ([]byte, error) HasCalled func(key []byte) error HasOrAddCalled func(key []byte, value []byte) error RemoveCalled func(key []byte) error ClearCacheCalled func() DestroyUnitCalled func() error }
func (*StorerStub) ClearCache ¶
func (ss *StorerStub) ClearCache()
func (*StorerStub) DestroyUnit ¶
func (ss *StorerStub) DestroyUnit() error
func (*StorerStub) Has ¶
func (ss *StorerStub) Has(key []byte) error
func (*StorerStub) HasOrAdd ¶ added in v1.0.3
func (ss *StorerStub) HasOrAdd(key []byte, value []byte) error
func (*StorerStub) IsInterfaceNil ¶
func (ss *StorerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerStub) Put ¶
func (ss *StorerStub) Put(key, data []byte) error
func (*StorerStub) Remove ¶
func (ss *StorerStub) Remove(key []byte) error
type TrieStub ¶
type TrieStub struct { GetCalled func(key []byte) ([]byte, error) UpdateCalled func(key, value []byte) error DeleteCalled func(key []byte) error RootCalled func() ([]byte, error) ProveCalled func(key []byte) ([][]byte, error) VerifyProofCalled func(proofs [][]byte, key []byte) (bool, error) CommitCalled func() error RecreateCalled func(root []byte) (data.Trie, error) DeepCloneCalled func() (data.Trie, error) }
func (*TrieStub) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
type Uint64CacherStub ¶
type Uint64CacherStub struct { ClearCalled func() PutCalled func(uint64, interface{}) bool GetCalled func(uint64) (interface{}, bool) HasCalled func(uint64) bool PeekCalled func(uint64) (interface{}, bool) HasOrAddCalled func(uint64, interface{}) (bool, bool) RemoveCalled func(uint64) RemoveOldestCalled func() KeysCalled func() []uint64 LenCalled func() int RegisterHandlerCalled func(handler func(nonce uint64)) }
func (*Uint64CacherStub) Clear ¶
func (ucs *Uint64CacherStub) Clear()
func (*Uint64CacherStub) Get ¶
func (ucs *Uint64CacherStub) Get(nonce uint64) (interface{}, bool)
func (*Uint64CacherStub) Has ¶
func (ucs *Uint64CacherStub) Has(nonce uint64) bool
func (*Uint64CacherStub) HasOrAdd ¶
func (ucs *Uint64CacherStub) HasOrAdd(nonce uint64, value interface{}) (bool, bool)
func (*Uint64CacherStub) Keys ¶
func (ucs *Uint64CacherStub) Keys() []uint64
func (*Uint64CacherStub) Len ¶
func (ucs *Uint64CacherStub) Len() int
func (*Uint64CacherStub) Peek ¶
func (ucs *Uint64CacherStub) Peek(nonce uint64) (interface{}, bool)
func (*Uint64CacherStub) Put ¶
func (ucs *Uint64CacherStub) Put(nonce uint64, value interface{}) bool
func (*Uint64CacherStub) RegisterHandler ¶
func (ucs *Uint64CacherStub) RegisterHandler(handler func(nonce uint64))
func (*Uint64CacherStub) Remove ¶
func (ucs *Uint64CacherStub) Remove(nonce uint64)
func (*Uint64CacherStub) RemoveOldest ¶
func (ucs *Uint64CacherStub) RemoveOldest()
type UpdaterStub ¶
func (*UpdaterStub) IsInterfaceNil ¶
func (updater *UpdaterStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*UpdaterStub) Update ¶
func (updater *UpdaterStub) Update(key, value []byte) error
Source Files ¶
- accountFactoryStub.go
- accountTrackerStub.go
- accountWrapperMock.go
- addressDummy.go
- addressMock.go
- cacherStub.go
- dataTrieTrackerStub.go
- hasherMock.go
- hasherMock127.go
- keccakMock.go
- marshalizerMock.go
- memDbMock.go
- nonceHashConverterMock.go
- protobufMock.go
- shardCoordinatorMock.go
- shardedDataStub.go
- storerStub.go
- trieStub.go
- uint64CacherStub.go
- updaterStub.go