Documentation ¶
Index ¶
- Variables
- func CreateTestingTriePruningStorer(coordinator sharding.Coordinator, notifier pruning.EpochStartNotifier) (storage.Storer, *persisterMap, error)
- func NewPersistersMap() *persisterMap
- type 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() common.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) RetrieveValueFromDataTrieTracker(key []byte) ([]byte, error)
- func (awm *AccountWrapMock) SetCode(code []byte)
- func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
- func (awm *AccountWrapMock) SetCodeMetadata(codeMetadata []byte)
- func (awm *AccountWrapMock) SetDataTrie(trie common.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
- func (*AccountWrapMockData) Descriptor() ([]byte, []int)
- func (this *AccountWrapMockData) Equal(that interface{}) bool
- func (m *AccountWrapMockData) GetMockValue() int64
- func (this *AccountWrapMockData) GoString() string
- 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 (*AccountWrapMockData) ProtoMessage()
- func (m *AccountWrapMockData) Reset()
- func (m *AccountWrapMockData) Size() (n int)
- func (this *AccountWrapMockData) String() string
- 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
- type AccountsFactoryStub
- type AccountsRepositoryStub
- func (stub *AccountsRepositoryStub) Close() error
- func (stub *AccountsRepositoryStub) GetAccountWithBlockInfo(address []byte, options api.AccountQueryOptions) (vmcommon.AccountHandler, common.BlockInfo, error)
- func (stub *AccountsRepositoryStub) GetCodeWithBlockInfo(codeHash []byte, options api.AccountQueryOptions) ([]byte, common.BlockInfo, error)
- func (stub *AccountsRepositoryStub) GetCurrentStateAccountsWrapper() state.AccountsAdapterAPI
- func (stub *AccountsRepositoryStub) IsInterfaceNil() bool
- type AccountsStub
- func (as *AccountsStub) CancelPrune(rootHash []byte, identifier state.TriePruningIdentifier)
- func (as *AccountsStub) Close() error
- func (as *AccountsStub) Commit() ([]byte, error)
- func (as *AccountsStub) CommitInEpoch(currentEpoch uint32, epochToCommit uint32) ([]byte, error)
- func (as *AccountsStub) GetAccountFromBytes(address []byte, accountBytes []byte) (vmcommon.AccountHandler, error)
- func (as *AccountsStub) GetAccountWithBlockInfo(address []byte, options common.RootHashHolder) (vmcommon.AccountHandler, common.BlockInfo, error)
- func (as *AccountsStub) GetAllLeaves(leavesChannel chan core.KeyValueHolder, ctx context.Context, rootHash []byte) error
- func (as *AccountsStub) GetCode(codeHash []byte) []byte
- func (as *AccountsStub) GetCodeWithBlockInfo(codeHash []byte, options common.RootHashHolder) ([]byte, common.BlockInfo, error)
- func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (vmcommon.AccountHandler, error)
- func (as *AccountsStub) GetStackDebugFirstEntry() []byte
- func (as *AccountsStub) GetTrie(codeHash []byte) (common.Trie, error)
- func (as *AccountsStub) IsInterfaceNil() bool
- func (as *AccountsStub) IsPruningEnabled() bool
- func (as *AccountsStub) JournalLen() int
- func (as *AccountsStub) LoadAccount(address []byte) (vmcommon.AccountHandler, error)
- func (as *AccountsStub) PruneTrie(rootHash []byte, identifier state.TriePruningIdentifier, ...)
- func (as *AccountsStub) RecreateAllTries(rootHash []byte) (map[string]common.Trie, error)
- func (as *AccountsStub) RecreateTrie(rootHash []byte) error
- func (as *AccountsStub) RecreateTrieFromEpoch(options common.RootHashHolder) error
- func (as *AccountsStub) RemoveAccount(addressContainer []byte) error
- func (as *AccountsStub) RevertToSnapshot(snapshot int) error
- func (as *AccountsStub) RootHash() ([]byte, error)
- func (as *AccountsStub) SaveAccount(account vmcommon.AccountHandler) error
- func (as *AccountsStub) SetStateCheckpoint(rootHash []byte)
- func (as *AccountsStub) SnapshotState(rootHash []byte)
- func (as *AccountsStub) StartSnapshotIfNeeded()
- type EvictionWaitingList
- func (ewl *EvictionWaitingList) Close() error
- func (ewl *EvictionWaitingList) Evict(rootHash []byte) (common.ModifiedHashes, error)
- func (ewl *EvictionWaitingList) IsInterfaceNil() bool
- func (ewl *EvictionWaitingList) Put(rootHash []byte, hashes common.ModifiedHashes) error
- func (ewl *EvictionWaitingList) ShouldKeepHash(hash string, identifier state.TriePruningIdentifier) (bool, error)
- type StoragePruningManagerStub
- func (stub *StoragePruningManagerStub) CancelPrune(rootHash []byte, identifier state.TriePruningIdentifier, ...)
- func (stub *StoragePruningManagerStub) Close() error
- func (stub *StoragePruningManagerStub) IsInterfaceNil() bool
- func (stub *StoragePruningManagerStub) MarkForEviction(bytes []byte, bytes2 []byte, hashes common.ModifiedHashes, ...) error
- func (stub *StoragePruningManagerStub) PruneTrie(rootHash []byte, identifier state.TriePruningIdentifier, ...)
- type UserAccountStub
- func (u *UserAccountStub) AddToBalance(value *big.Int) error
- func (u *UserAccountStub) AddToDeveloperReward(*big.Int)
- func (u *UserAccountStub) AddressBytes() []byte
- func (u *UserAccountStub) ChangeOwnerAddress([]byte, []byte) error
- func (u *UserAccountStub) ClaimDeveloperRewards([]byte) (*big.Int, error)
- func (u *UserAccountStub) DataTrie() common.Trie
- func (u *UserAccountStub) DataTrieTracker() state.DataTrieTracker
- func (u *UserAccountStub) GetBalance() *big.Int
- func (u *UserAccountStub) GetCodeHash() []byte
- func (u *UserAccountStub) GetCodeMetadata() []byte
- func (u *UserAccountStub) GetDeveloperReward() *big.Int
- func (u *UserAccountStub) GetNonce() uint64
- func (u *UserAccountStub) GetOwnerAddress() []byte
- func (u *UserAccountStub) GetRootHash() []byte
- func (u *UserAccountStub) GetUserName() []byte
- func (u *UserAccountStub) HasNewCode() bool
- func (u *UserAccountStub) IncreaseNonce(_ uint64)
- func (u *UserAccountStub) IsInterfaceNil() bool
- func (u *UserAccountStub) RetrieveValueFromDataTrieTracker(_ []byte) ([]byte, error)
- func (u *UserAccountStub) SetCode(_ []byte)
- func (u *UserAccountStub) SetCodeHash([]byte)
- func (u *UserAccountStub) SetCodeMetadata(_ []byte)
- func (u *UserAccountStub) SetDataTrie(_ common.Trie)
- func (u *UserAccountStub) SetOwnerAddress([]byte)
- func (u *UserAccountStub) SetRootHash([]byte)
- func (u *UserAccountStub) SetUserName(_ []byte)
- func (u *UserAccountStub) SubFromBalance(_ *big.Int) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CreateTestingTriePruningStorer ¶ added in v1.3.37
func CreateTestingTriePruningStorer(coordinator sharding.Coordinator, notifier pruning.EpochStartNotifier) (storage.Storer, *persisterMap, error)
CreateTestingTriePruningStorer creates a new trie pruning storer that is used for testing
func NewPersistersMap ¶ added in v1.3.37
func NewPersistersMap() *persisterMap
NewPersistersMap returns a new persisterMap
Types ¶
type AccountWrapMock ¶
type AccountWrapMock struct { AccountWrapMockData CodeHash []byte CodeMetadata []byte RootHash []byte SetNonceWithJournalCalled func(nonce uint64) error `json:"-"` SetCodeHashWithJournalCalled func(codeHash []byte) error `json:"-"` SetCodeWithJournalCalled func([]byte) error `json:"-"` // contains filtered or unexported fields }
AccountWrapMock -
func (*AccountWrapMock) AddToBalance ¶
func (awm *AccountWrapMock) AddToBalance(_ *big.Int) error
AddToBalance -
func (*AccountWrapMock) AddToDeveloperReward ¶
func (awm *AccountWrapMock) AddToDeveloperReward(*big.Int)
AddToDeveloperReward -
func (*AccountWrapMock) AddressBytes ¶
func (awm *AccountWrapMock) AddressBytes() []byte
AddressBytes -
func (*AccountWrapMock) ChangeOwnerAddress ¶
func (awm *AccountWrapMock) ChangeOwnerAddress([]byte, []byte) error
ChangeOwnerAddress -
func (*AccountWrapMock) ClaimDeveloperRewards ¶
func (awm *AccountWrapMock) ClaimDeveloperRewards([]byte) (*big.Int, error)
ClaimDeveloperRewards -
func (*AccountWrapMock) DataTrieTracker ¶
func (awm *AccountWrapMock) DataTrieTracker() state.DataTrieTracker
DataTrieTracker -
func (*AccountWrapMock) GetCodeHash ¶
func (awm *AccountWrapMock) GetCodeHash() []byte
GetCodeHash -
func (*AccountWrapMock) GetCodeMetadata ¶
func (awm *AccountWrapMock) GetCodeMetadata() []byte
GetCodeMetadata -
func (*AccountWrapMock) GetDeveloperReward ¶
func (awm *AccountWrapMock) GetDeveloperReward() *big.Int
GetDeveloperReward -
func (*AccountWrapMock) GetNonce ¶
func (awm *AccountWrapMock) GetNonce() uint64
GetNonce gets the nonce of the account
func (*AccountWrapMock) GetOwnerAddress ¶
func (awm *AccountWrapMock) GetOwnerAddress() []byte
GetOwnerAddress -
func (*AccountWrapMock) GetRootHash ¶
func (awm *AccountWrapMock) GetRootHash() []byte
GetRootHash -
func (*AccountWrapMock) GetUserName ¶
func (awm *AccountWrapMock) GetUserName() []byte
GetUserName -
func (*AccountWrapMock) IncreaseNonce ¶
func (awm *AccountWrapMock) IncreaseNonce(val uint64)
IncreaseNonce adds the given value to the current nonce
func (*AccountWrapMock) IsInterfaceNil ¶
func (awm *AccountWrapMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*AccountWrapMock) RetrieveValueFromDataTrieTracker ¶
func (awm *AccountWrapMock) RetrieveValueFromDataTrieTracker(key []byte) ([]byte, error)
RetrieveValueFromDataTrieTracker -
func (*AccountWrapMock) SetCodeHash ¶
func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
SetCodeHash -
func (*AccountWrapMock) SetCodeMetadata ¶
func (awm *AccountWrapMock) SetCodeMetadata(codeMetadata []byte)
SetCodeMetadata -
func (*AccountWrapMock) SetDataTrie ¶
func (awm *AccountWrapMock) SetDataTrie(trie common.Trie)
SetDataTrie -
func (*AccountWrapMock) SetOwnerAddress ¶
func (awm *AccountWrapMock) SetOwnerAddress([]byte)
SetOwnerAddress -
func (*AccountWrapMock) SetRootHash ¶
func (awm *AccountWrapMock) SetRootHash(rootHash []byte)
SetRootHash -
func (*AccountWrapMock) SetUserName ¶
func (awm *AccountWrapMock) SetUserName(_ []byte)
SetUserName -
func (*AccountWrapMock) SubFromBalance ¶
func (awm *AccountWrapMock) SubFromBalance(_ *big.Int) error
SubFromBalance -
type AccountWrapMockData ¶
type AccountWrapMockData struct {
MockValue int64 `protobuf:"varint,1,opt,name=MockValue,proto3" json:"MockValue,omitempty"`
}
func (*AccountWrapMockData) Descriptor ¶
func (*AccountWrapMockData) Descriptor() ([]byte, []int)
func (*AccountWrapMockData) Equal ¶
func (this *AccountWrapMockData) Equal(that interface{}) bool
func (*AccountWrapMockData) GetMockValue ¶
func (m *AccountWrapMockData) GetMockValue() int64
func (*AccountWrapMockData) GoString ¶
func (this *AccountWrapMockData) GoString() string
func (*AccountWrapMockData) Marshal ¶
func (m *AccountWrapMockData) Marshal() (dAtA []byte, err error)
func (*AccountWrapMockData) MarshalTo ¶
func (m *AccountWrapMockData) MarshalTo(dAtA []byte) (int, error)
func (*AccountWrapMockData) MarshalToSizedBuffer ¶
func (m *AccountWrapMockData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AccountWrapMockData) ProtoMessage ¶
func (*AccountWrapMockData) ProtoMessage()
func (*AccountWrapMockData) Reset ¶
func (m *AccountWrapMockData) Reset()
func (*AccountWrapMockData) Size ¶
func (m *AccountWrapMockData) Size() (n int)
func (*AccountWrapMockData) String ¶
func (this *AccountWrapMockData) String() string
func (*AccountWrapMockData) Unmarshal ¶
func (m *AccountWrapMockData) Unmarshal(dAtA []byte) error
func (*AccountWrapMockData) XXX_DiscardUnknown ¶
func (m *AccountWrapMockData) XXX_DiscardUnknown()
func (*AccountWrapMockData) XXX_Marshal ¶
func (m *AccountWrapMockData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountWrapMockData) XXX_Merge ¶
func (m *AccountWrapMockData) XXX_Merge(src proto.Message)
func (*AccountWrapMockData) XXX_Size ¶
func (m *AccountWrapMockData) XXX_Size() int
func (*AccountWrapMockData) XXX_Unmarshal ¶
func (m *AccountWrapMockData) XXX_Unmarshal(b []byte) error
type AccountsFactoryStub ¶
type AccountsFactoryStub struct {
CreateAccountCalled func(address []byte) (vmcommon.AccountHandler, error)
}
AccountsFactoryStub -
func (*AccountsFactoryStub) CreateAccount ¶
func (afs *AccountsFactoryStub) CreateAccount(address []byte) (vmcommon.AccountHandler, error)
CreateAccount -
func (*AccountsFactoryStub) IsInterfaceNil ¶
func (afs *AccountsFactoryStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type AccountsRepositoryStub ¶ added in v1.3.37
type AccountsRepositoryStub struct { GetAccountWithBlockInfoCalled func(address []byte, options api.AccountQueryOptions) (vmcommon.AccountHandler, common.BlockInfo, error) GetCodeWithBlockInfoCalled func(codeHash []byte, options api.AccountQueryOptions) ([]byte, common.BlockInfo, error) GetCurrentStateAccountsWrapperCalled func() state.AccountsAdapterAPI CloseCalled func() error }
AccountsRepositoryStub -
func (*AccountsRepositoryStub) Close ¶ added in v1.3.37
func (stub *AccountsRepositoryStub) Close() error
Close -
func (*AccountsRepositoryStub) GetAccountWithBlockInfo ¶ added in v1.3.37
func (stub *AccountsRepositoryStub) GetAccountWithBlockInfo(address []byte, options api.AccountQueryOptions) (vmcommon.AccountHandler, common.BlockInfo, error)
GetAccountWithBlockInfo -
func (*AccountsRepositoryStub) GetCodeWithBlockInfo ¶ added in v1.3.37
func (stub *AccountsRepositoryStub) GetCodeWithBlockInfo(codeHash []byte, options api.AccountQueryOptions) ([]byte, common.BlockInfo, error)
GetCodeWithBlockInfo -
func (*AccountsRepositoryStub) GetCurrentStateAccountsWrapper ¶ added in v1.3.37
func (stub *AccountsRepositoryStub) GetCurrentStateAccountsWrapper() state.AccountsAdapterAPI
GetCurrentStateAccountsWrapper -
func (*AccountsRepositoryStub) IsInterfaceNil ¶ added in v1.3.37
func (stub *AccountsRepositoryStub) IsInterfaceNil() bool
IsInterfaceNil -
type AccountsStub ¶
type AccountsStub struct { GetExistingAccountCalled func(addressContainer []byte) (vmcommon.AccountHandler, error) GetAccountFromBytesCalled func(address []byte, accountBytes []byte) (vmcommon.AccountHandler, error) LoadAccountCalled func(container []byte) (vmcommon.AccountHandler, error) SaveAccountCalled func(account vmcommon.AccountHandler) error RemoveAccountCalled func(addressContainer []byte) error CommitCalled func() ([]byte, error) CommitInEpochCalled func(uint32, uint32) ([]byte, error) JournalLenCalled func() int RevertToSnapshotCalled func(snapshot int) error RootHashCalled func() ([]byte, error) RecreateTrieCalled func(rootHash []byte) error RecreateTrieFromEpochCalled func(options common.RootHashHolder) error PruneTrieCalled func(rootHash []byte, identifier state.TriePruningIdentifier, handler state.PruningHandler) CancelPruneCalled func(rootHash []byte, identifier state.TriePruningIdentifier) SnapshotStateCalled func(rootHash []byte) SetStateCheckpointCalled func(rootHash []byte) IsPruningEnabledCalled func() bool GetAllLeavesCalled func(leavesChannel chan core.KeyValueHolder, ctx context.Context, rootHash []byte) error RecreateAllTriesCalled func(rootHash []byte) (map[string]common.Trie, error) GetCodeCalled func([]byte) []byte GetTrieCalled func([]byte) (common.Trie, error) GetStackDebugFirstEntryCalled func() []byte GetAccountWithBlockInfoCalled func(address []byte, options common.RootHashHolder) (vmcommon.AccountHandler, common.BlockInfo, error) GetCodeWithBlockInfoCalled func(codeHash []byte, options common.RootHashHolder) ([]byte, common.BlockInfo, error) CloseCalled func() error StartSnapshotIfNeededCalled func() }
AccountsStub -
func (*AccountsStub) CancelPrune ¶
func (as *AccountsStub) CancelPrune(rootHash []byte, identifier state.TriePruningIdentifier)
CancelPrune -
func (*AccountsStub) CommitInEpoch ¶ added in v1.3.0
func (as *AccountsStub) CommitInEpoch(currentEpoch uint32, epochToCommit uint32) ([]byte, error)
CommitInEpoch -
func (*AccountsStub) GetAccountFromBytes ¶ added in v1.2.23
func (as *AccountsStub) GetAccountFromBytes(address []byte, accountBytes []byte) (vmcommon.AccountHandler, error)
GetAccountFromBytes -
func (*AccountsStub) GetAccountWithBlockInfo ¶ added in v1.3.37
func (as *AccountsStub) GetAccountWithBlockInfo(address []byte, options common.RootHashHolder) (vmcommon.AccountHandler, common.BlockInfo, error)
GetAccountWithBlockInfo -
func (*AccountsStub) GetAllLeaves ¶
func (as *AccountsStub) GetAllLeaves(leavesChannel chan core.KeyValueHolder, ctx context.Context, rootHash []byte) error
GetAllLeaves -
func (*AccountsStub) GetCodeWithBlockInfo ¶ added in v1.3.37
func (as *AccountsStub) GetCodeWithBlockInfo(codeHash []byte, options common.RootHashHolder) ([]byte, common.BlockInfo, error)
GetCodeWithBlockInfo -
func (*AccountsStub) GetExistingAccount ¶
func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (vmcommon.AccountHandler, error)
GetExistingAccount -
func (*AccountsStub) GetStackDebugFirstEntry ¶ added in v1.2.28
func (as *AccountsStub) GetStackDebugFirstEntry() []byte
GetStackDebugFirstEntry -
func (*AccountsStub) GetTrie ¶
func (as *AccountsStub) GetTrie(codeHash []byte) (common.Trie, error)
GetTrie -
func (*AccountsStub) IsInterfaceNil ¶
func (as *AccountsStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AccountsStub) IsPruningEnabled ¶
func (as *AccountsStub) IsPruningEnabled() bool
IsPruningEnabled -
func (*AccountsStub) LoadAccount ¶
func (as *AccountsStub) LoadAccount(address []byte) (vmcommon.AccountHandler, error)
LoadAccount -
func (*AccountsStub) PruneTrie ¶
func (as *AccountsStub) PruneTrie(rootHash []byte, identifier state.TriePruningIdentifier, handler state.PruningHandler)
PruneTrie -
func (*AccountsStub) RecreateAllTries ¶
RecreateAllTries -
func (*AccountsStub) RecreateTrie ¶
func (as *AccountsStub) RecreateTrie(rootHash []byte) error
RecreateTrie -
func (*AccountsStub) RecreateTrieFromEpoch ¶ added in v1.3.37
func (as *AccountsStub) RecreateTrieFromEpoch(options common.RootHashHolder) error
RecreateTrieFromEpoch -
func (*AccountsStub) RemoveAccount ¶
func (as *AccountsStub) RemoveAccount(addressContainer []byte) error
RemoveAccount -
func (*AccountsStub) RevertToSnapshot ¶
func (as *AccountsStub) RevertToSnapshot(snapshot int) error
RevertToSnapshot -
func (*AccountsStub) SaveAccount ¶
func (as *AccountsStub) SaveAccount(account vmcommon.AccountHandler) error
SaveAccount -
func (*AccountsStub) SetStateCheckpoint ¶
func (as *AccountsStub) SetStateCheckpoint(rootHash []byte)
SetStateCheckpoint -
func (*AccountsStub) SnapshotState ¶
func (as *AccountsStub) SnapshotState(rootHash []byte)
SnapshotState -
func (*AccountsStub) StartSnapshotIfNeeded ¶ added in v1.3.44
func (as *AccountsStub) StartSnapshotIfNeeded()
StartSnapshotIfNeeded -
type EvictionWaitingList ¶
type EvictionWaitingList struct { Cache map[string]common.ModifiedHashes CacheSize uint Db storage.Persister Marshalizer marshal.Marshalizer OpMutex sync.RWMutex }
EvictionWaitingList is a structure that caches keys that need to be removed from a certain database. If the cache is full, the keys will be stored in the underlying database. Writing at the same key in cacher and db will overwrite the previous values.
func NewEvictionWaitingList ¶
func NewEvictionWaitingList(size uint, db storage.Persister, marshalizer marshal.Marshalizer) *EvictionWaitingList
NewEvictionWaitingList creates a new instance of evictionWaitingList
func (*EvictionWaitingList) Evict ¶
func (ewl *EvictionWaitingList) Evict(rootHash []byte) (common.ModifiedHashes, error)
Evict returns and removes from the waiting list all the hashes from the position given by the root hash
func (*EvictionWaitingList) IsInterfaceNil ¶
func (ewl *EvictionWaitingList) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*EvictionWaitingList) Put ¶
func (ewl *EvictionWaitingList) Put(rootHash []byte, hashes common.ModifiedHashes) error
Put stores the given hashes in the eviction waiting list, in the position given by the root hash
func (*EvictionWaitingList) ShouldKeepHash ¶
func (ewl *EvictionWaitingList) ShouldKeepHash(hash string, identifier state.TriePruningIdentifier) (bool, error)
ShouldKeepHash -
type StoragePruningManagerStub ¶ added in v1.3.37
type StoragePruningManagerStub struct { MarkForEvictionCalled func(bytes []byte, bytes2 []byte, hashes common.ModifiedHashes, hashes2 common.ModifiedHashes) error PruneTrieCalled func(rootHash []byte, identifier state.TriePruningIdentifier, tsm common.StorageManager, handler state.PruningHandler) CancelPruneCalled func(rootHash []byte, identifier state.TriePruningIdentifier, tsm common.StorageManager) CloseCalled func() error }
StoragePruningManagerStub -
func (*StoragePruningManagerStub) CancelPrune ¶ added in v1.3.37
func (stub *StoragePruningManagerStub) CancelPrune(rootHash []byte, identifier state.TriePruningIdentifier, tsm common.StorageManager)
CancelPrune -
func (*StoragePruningManagerStub) Close ¶ added in v1.3.37
func (stub *StoragePruningManagerStub) Close() error
Close -
func (*StoragePruningManagerStub) IsInterfaceNil ¶ added in v1.3.37
func (stub *StoragePruningManagerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*StoragePruningManagerStub) MarkForEviction ¶ added in v1.3.37
func (stub *StoragePruningManagerStub) MarkForEviction(bytes []byte, bytes2 []byte, hashes common.ModifiedHashes, hashes2 common.ModifiedHashes) error
MarkForEviction -
func (*StoragePruningManagerStub) PruneTrie ¶ added in v1.3.37
func (stub *StoragePruningManagerStub) PruneTrie(rootHash []byte, identifier state.TriePruningIdentifier, tsm common.StorageManager, handler state.PruningHandler)
PruneTrie -
type UserAccountStub ¶
type UserAccountStub struct { Balance *big.Int AddToBalanceCalled func(value *big.Int) error DataTrieTrackerCalled func() state.DataTrieTracker }
UserAccountStub -
func (*UserAccountStub) AddToBalance ¶
func (u *UserAccountStub) AddToBalance(value *big.Int) error
AddToBalance -
func (*UserAccountStub) AddToDeveloperReward ¶
func (u *UserAccountStub) AddToDeveloperReward(*big.Int)
AddToDeveloperReward -
func (*UserAccountStub) AddressBytes ¶
func (u *UserAccountStub) AddressBytes() []byte
AddressBytes -
func (*UserAccountStub) ChangeOwnerAddress ¶
func (u *UserAccountStub) ChangeOwnerAddress([]byte, []byte) error
ChangeOwnerAddress -
func (*UserAccountStub) ClaimDeveloperRewards ¶
func (u *UserAccountStub) ClaimDeveloperRewards([]byte) (*big.Int, error)
ClaimDeveloperRewards -
func (*UserAccountStub) DataTrieTracker ¶
func (u *UserAccountStub) DataTrieTracker() state.DataTrieTracker
DataTrieTracker -
func (*UserAccountStub) GetCodeMetadata ¶
func (u *UserAccountStub) GetCodeMetadata() []byte
GetCodeMetadata -
func (*UserAccountStub) GetDeveloperReward ¶
func (u *UserAccountStub) GetDeveloperReward() *big.Int
GetDeveloperReward -
func (*UserAccountStub) GetOwnerAddress ¶
func (u *UserAccountStub) GetOwnerAddress() []byte
GetOwnerAddress -
func (*UserAccountStub) IncreaseNonce ¶
func (u *UserAccountStub) IncreaseNonce(_ uint64)
IncreaseNonce -
func (*UserAccountStub) IsInterfaceNil ¶
func (u *UserAccountStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*UserAccountStub) RetrieveValueFromDataTrieTracker ¶
func (u *UserAccountStub) RetrieveValueFromDataTrieTracker(_ []byte) ([]byte, error)
RetrieveValueFromDataTrieTracker -
func (*UserAccountStub) SetCodeMetadata ¶
func (u *UserAccountStub) SetCodeMetadata(_ []byte)
SetCodeMetadata -
func (*UserAccountStub) SetDataTrie ¶
func (u *UserAccountStub) SetDataTrie(_ common.Trie)
SetDataTrie -
func (*UserAccountStub) SetOwnerAddress ¶
func (u *UserAccountStub) SetOwnerAddress([]byte)
SetOwnerAddress -
func (*UserAccountStub) SubFromBalance ¶
func (u *UserAccountStub) SubFromBalance(_ *big.Int) error
SubFromBalance -