Documentation ¶
Index ¶
- type DataTrieMigratorStub
- func (d *DataTrieMigratorStub) AddLeafToMigrationQueue(leafData core.TrieData, newLeafVersion core.TrieNodeVersion) (bool, error)
- func (d *DataTrieMigratorStub) ConsumeStorageLoadGas() bool
- func (d *DataTrieMigratorStub) GetLeavesToBeMigrated() []core.TrieData
- func (d *DataTrieMigratorStub) IsInterfaceNil() bool
- type DataTrieTrackerStub
- func (dtts *DataTrieTrackerStub) DataTrie() common.DataTrieHandler
- func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
- func (dtts *DataTrieTrackerStub) MigrateDataTrieLeaves(args vmcommon.ArgsMigrateDataTrieLeaves) error
- func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, uint32, error)
- func (dtts *DataTrieTrackerStub) SaveDirtyData(mainTrie common.Trie) ([]core.TrieData, error)
- func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte) error
- func (dtts *DataTrieTrackerStub) SetDataTrie(tr common.Trie)
- type MockStatistics
- func (m *MockStatistics) AddTrieStats(_ common.TrieStatisticsHandler, _ common.TrieType)
- func (m *MockStatistics) GetSnapshotDuration() int64
- func (m *MockStatistics) GetSnapshotNumNodes() uint64
- func (m *MockStatistics) IsInterfaceNil() bool
- func (m *MockStatistics) NewSnapshotStarted()
- func (m *MockStatistics) SnapshotFinished()
- func (m *MockStatistics) WaitForSnapshotsToFinish()
- type SnapshotPruningStorerStub
- func (spss *SnapshotPruningStorerStub) Close() error
- func (spss *SnapshotPruningStorerStub) GetFromCurrentEpoch(key []byte) ([]byte, error)
- func (spss *SnapshotPruningStorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
- func (spss *SnapshotPruningStorerStub) GetFromLastEpoch(key []byte) ([]byte, error)
- func (spss *SnapshotPruningStorerStub) GetFromOldEpochsWithoutAddingToCache(key []byte) ([]byte, core.OptionalUint32, error)
- func (spss *SnapshotPruningStorerStub) GetLatestStorageEpoch() (uint32, error)
- func (spss *SnapshotPruningStorerStub) PutInEpoch(key []byte, data []byte, epoch uint32) error
- func (spss *SnapshotPruningStorerStub) PutInEpochWithoutCache(key []byte, data []byte, epoch uint32) error
- func (spss *SnapshotPruningStorerStub) RemoveFromAllActiveEpochs(key []byte) error
- func (spss *SnapshotPruningStorerStub) RemoveFromCurrentEpoch(key []byte) error
- type TrieLeafParserStub
- type TrieStub
- func (ts *TrieStub) Close() error
- func (ts *TrieStub) CollectLeavesForMigration(args vmcommon.ArgsMigrateDataTrieLeaves) error
- func (ts *TrieStub) Commit() error
- func (ts *TrieStub) Delete(key []byte) error
- func (ts *TrieStub) Get(key []byte) ([]byte, uint32, error)
- func (ts *TrieStub) GetAllHashes() ([][]byte, error)
- func (ts *TrieStub) GetAllLeavesOnChannel(leavesChannels *common.TrieIteratorChannels, ctx context.Context, ...) error
- func (ts *TrieStub) GetDirtyHashes() (common.ModifiedHashes, error)
- func (ts *TrieStub) GetObsoleteHashes() [][]byte
- func (ts *TrieStub) GetOldRoot() []byte
- func (ts *TrieStub) GetProof(key []byte) ([][]byte, []byte, error)
- func (ts *TrieStub) GetSerializedNode(bytes []byte) ([]byte, error)
- func (ts *TrieStub) GetSerializedNodes(hash []byte, maxBuffToSend uint64) ([][]byte, uint64, error)
- func (ts *TrieStub) GetStorageManager() common.StorageManager
- func (ts *TrieStub) IsInterfaceNil() bool
- func (ts *TrieStub) IsMigratedToLatestVersion() (bool, error)
- func (ts *TrieStub) Recreate(root []byte) (common.Trie, error)
- func (ts *TrieStub) RecreateFromEpoch(options common.RootHashHolder) (common.Trie, error)
- func (ts *TrieStub) RootHash() ([]byte, error)
- func (ts *TrieStub) SetNewHashes(_ common.ModifiedHashes)
- func (ts *TrieStub) String() string
- func (ts *TrieStub) Update(key, value []byte) error
- func (ts *TrieStub) UpdateWithVersion(key []byte, value []byte, version core.TrieNodeVersion) error
- func (ts *TrieStub) VerifyProof(rootHash []byte, key []byte, proof [][]byte) (bool, error)
- type TriesHolderStub
- func (ths *TriesHolderStub) Get(key []byte) common.Trie
- func (ths *TriesHolderStub) GetAll() []common.Trie
- func (ths *TriesHolderStub) IsInterfaceNil() bool
- func (ths *TriesHolderStub) Put(key []byte, trie common.Trie)
- func (ths *TriesHolderStub) Replace(key []byte, trie common.Trie)
- func (ths *TriesHolderStub) Reset()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataTrieMigratorStub ¶ added in v1.6.0
type DataTrieMigratorStub struct { ConsumeStorageLoadGasCalled func() bool AddLeafToMigrationQueueCalled func(leafData core.TrieData, newLeafVersion core.TrieNodeVersion) (bool, error) GetLeavesToBeMigratedCalled func() []core.TrieData }
DataTrieMigratorStub -
func (*DataTrieMigratorStub) AddLeafToMigrationQueue ¶ added in v1.6.0
func (d *DataTrieMigratorStub) AddLeafToMigrationQueue(leafData core.TrieData, newLeafVersion core.TrieNodeVersion) (bool, error)
AddLeafToMigrationQueue -
func (*DataTrieMigratorStub) ConsumeStorageLoadGas ¶ added in v1.6.0
func (d *DataTrieMigratorStub) ConsumeStorageLoadGas() bool
ConsumeStorageLoadGas -
func (*DataTrieMigratorStub) GetLeavesToBeMigrated ¶ added in v1.6.0
func (d *DataTrieMigratorStub) GetLeavesToBeMigrated() []core.TrieData
GetLeavesToBeMigrated -
func (*DataTrieMigratorStub) IsInterfaceNil ¶ added in v1.6.0
func (d *DataTrieMigratorStub) IsInterfaceNil() bool
IsInterfaceNil -
type DataTrieTrackerStub ¶
type DataTrieTrackerStub struct { RetrieveValueCalled func(key []byte) ([]byte, uint32, error) SaveKeyValueCalled func(key []byte, value []byte) error SetDataTrieCalled func(tr common.Trie) DataTrieCalled func() common.Trie SaveDirtyDataCalled func(trie common.Trie) ([]core.TrieData, error) SaveTrieDataCalled func(trieData core.TrieData) error MigrateDataTrieLeavesCalled func(args vmcommon.ArgsMigrateDataTrieLeaves) error // contains filtered or unexported fields }
DataTrieTrackerStub -
func (*DataTrieTrackerStub) DataTrie ¶
func (dtts *DataTrieTrackerStub) DataTrie() common.DataTrieHandler
DataTrie -
func (*DataTrieTrackerStub) IsInterfaceNil ¶
func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*DataTrieTrackerStub) MigrateDataTrieLeaves ¶ added in v1.6.0
func (dtts *DataTrieTrackerStub) MigrateDataTrieLeaves(args vmcommon.ArgsMigrateDataTrieLeaves) error
MigrateDataTrieLeaves -
func (*DataTrieTrackerStub) RetrieveValue ¶
func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, uint32, error)
RetrieveValue -
func (*DataTrieTrackerStub) SaveDirtyData ¶
SaveDirtyData -
func (*DataTrieTrackerStub) SaveKeyValue ¶
func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte) error
SaveKeyValue -
func (*DataTrieTrackerStub) SetDataTrie ¶
func (dtts *DataTrieTrackerStub) SetDataTrie(tr common.Trie)
SetDataTrie -
type MockStatistics ¶
type MockStatistics struct {
WaitForSnapshotsToFinishCalled func()
}
MockStatistics -
func (*MockStatistics) AddTrieStats ¶
func (m *MockStatistics) AddTrieStats(_ common.TrieStatisticsHandler, _ common.TrieType)
AddTrieStats -
func (*MockStatistics) GetSnapshotDuration ¶ added in v1.6.0
func (m *MockStatistics) GetSnapshotDuration() int64
GetSnapshotDuration -
func (*MockStatistics) GetSnapshotNumNodes ¶ added in v1.6.0
func (m *MockStatistics) GetSnapshotNumNodes() uint64
GetSnapshotNumNodes -
func (*MockStatistics) IsInterfaceNil ¶ added in v1.6.0
func (m *MockStatistics) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MockStatistics) NewSnapshotStarted ¶
func (m *MockStatistics) NewSnapshotStarted()
NewSnapshotStarted -
func (*MockStatistics) SnapshotFinished ¶
func (m *MockStatistics) SnapshotFinished()
SnapshotFinished -
func (*MockStatistics) WaitForSnapshotsToFinish ¶
func (m *MockStatistics) WaitForSnapshotsToFinish()
WaitForSnapshotsToFinish -
type SnapshotPruningStorerStub ¶
type SnapshotPruningStorerStub struct { *testscommon.MemDbMock GetFromOldEpochsWithoutAddingToCacheCalled func(key []byte) ([]byte, core.OptionalUint32, error) GetFromLastEpochCalled func(key []byte) ([]byte, error) GetFromCurrentEpochCalled func(key []byte) ([]byte, error) GetFromEpochCalled func(key []byte, epoch uint32) ([]byte, error) PutInEpochCalled func(key []byte, data []byte, epoch uint32) error PutInEpochWithoutCacheCalled func(key []byte, data []byte, epoch uint32) error GetLatestStorageEpochCalled func() (uint32, error) RemoveFromCurrentEpochCalled func(key []byte) error CloseCalled func() error RemoveFromAllActiveEpochsCalled func(key []byte) error }
SnapshotPruningStorerStub -
func (*SnapshotPruningStorerStub) Close ¶ added in v1.6.0
func (spss *SnapshotPruningStorerStub) Close() error
Close -
func (*SnapshotPruningStorerStub) GetFromCurrentEpoch ¶
func (spss *SnapshotPruningStorerStub) GetFromCurrentEpoch(key []byte) ([]byte, error)
GetFromCurrentEpoch -
func (*SnapshotPruningStorerStub) GetFromEpoch ¶
func (spss *SnapshotPruningStorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
GetFromEpoch -
func (*SnapshotPruningStorerStub) GetFromLastEpoch ¶
func (spss *SnapshotPruningStorerStub) GetFromLastEpoch(key []byte) ([]byte, error)
GetFromLastEpoch -
func (*SnapshotPruningStorerStub) GetFromOldEpochsWithoutAddingToCache ¶
func (spss *SnapshotPruningStorerStub) GetFromOldEpochsWithoutAddingToCache(key []byte) ([]byte, core.OptionalUint32, error)
GetFromOldEpochsWithoutAddingToCache -
func (*SnapshotPruningStorerStub) GetLatestStorageEpoch ¶
func (spss *SnapshotPruningStorerStub) GetLatestStorageEpoch() (uint32, error)
GetLatestStorageEpoch -
func (*SnapshotPruningStorerStub) PutInEpoch ¶
func (spss *SnapshotPruningStorerStub) PutInEpoch(key []byte, data []byte, epoch uint32) error
PutInEpoch -
func (*SnapshotPruningStorerStub) PutInEpochWithoutCache ¶
func (spss *SnapshotPruningStorerStub) PutInEpochWithoutCache(key []byte, data []byte, epoch uint32) error
PutInEpochWithoutCache -
func (*SnapshotPruningStorerStub) RemoveFromAllActiveEpochs ¶ added in v1.6.0
func (spss *SnapshotPruningStorerStub) RemoveFromAllActiveEpochs(key []byte) error
RemoveFromAllActiveEpochs -
func (*SnapshotPruningStorerStub) RemoveFromCurrentEpoch ¶
func (spss *SnapshotPruningStorerStub) RemoveFromCurrentEpoch(key []byte) error
RemoveFromCurrentEpoch -
type TrieLeafParserStub ¶ added in v1.6.0
type TrieLeafParserStub struct {
ParseLeafCalled func(key []byte, val []byte, version core.TrieNodeVersion) (core.KeyValueHolder, error)
}
TrieLeafParserStub -
func (*TrieLeafParserStub) IsInterfaceNil ¶ added in v1.6.0
func (tlps *TrieLeafParserStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TrieLeafParserStub) ParseLeaf ¶ added in v1.6.0
func (tlps *TrieLeafParserStub) ParseLeaf(key []byte, val []byte, version core.TrieNodeVersion) (core.KeyValueHolder, error)
ParseLeaf -
type TrieStub ¶
type TrieStub struct { GetCalled func(key []byte) ([]byte, uint32, error) UpdateCalled func(key, value []byte) error UpdateWithVersionCalled func(key, value []byte, version core.TrieNodeVersion) error DeleteCalled func(key []byte) error RootCalled func() ([]byte, error) CommitCalled func() error RecreateCalled func(root []byte) (common.Trie, error) RecreateFromEpochCalled func(options common.RootHashHolder) (common.Trie, error) GetObsoleteHashesCalled func() [][]byte AppendToOldHashesCalled func([][]byte) GetSerializedNodesCalled func([]byte, uint64) ([][]byte, uint64, error) GetAllHashesCalled func() ([][]byte, error) GetAllLeavesOnChannelCalled func(leavesChannels *common.TrieIteratorChannels, ctx context.Context, rootHash []byte, keyBuilder common.KeyBuilder, trieLeafParser common.TrieLeafParser) error GetProofCalled func(key []byte) ([][]byte, []byte, error) VerifyProofCalled func(rootHash []byte, key []byte, proof [][]byte) (bool, error) GetStorageManagerCalled func() common.StorageManager GetSerializedNodeCalled func(bytes []byte) ([]byte, error) GetOldRootCalled func() []byte CloseCalled func() error CollectLeavesForMigrationCalled func(args vmcommon.ArgsMigrateDataTrieLeaves) error IsMigratedToLatestVersionCalled func() (bool, error) }
TrieStub -
func (*TrieStub) CollectLeavesForMigration ¶ added in v1.6.0
func (ts *TrieStub) CollectLeavesForMigration(args vmcommon.ArgsMigrateDataTrieLeaves) error
CollectLeavesForMigration -
func (*TrieStub) GetAllLeavesOnChannel ¶
func (ts *TrieStub) GetAllLeavesOnChannel(leavesChannels *common.TrieIteratorChannels, ctx context.Context, rootHash []byte, keyBuilder common.KeyBuilder, trieLeafParser common.TrieLeafParser) error
GetAllLeavesOnChannel -
func (*TrieStub) GetDirtyHashes ¶
func (ts *TrieStub) GetDirtyHashes() (common.ModifiedHashes, error)
GetDirtyHashes -
func (*TrieStub) GetObsoleteHashes ¶
GetObsoleteHashes resets the oldHashes and oldRoot variables and returns the old hashes
func (*TrieStub) GetSerializedNode ¶
GetSerializedNode -
func (*TrieStub) GetSerializedNodes ¶
GetSerializedNodes -
func (*TrieStub) GetStorageManager ¶
func (ts *TrieStub) GetStorageManager() common.StorageManager
GetStorageManager -
func (*TrieStub) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
func (*TrieStub) IsMigratedToLatestVersion ¶ added in v1.6.0
IsMigratedToLatestVersion -
func (*TrieStub) RecreateFromEpoch ¶
RecreateFromEpoch -
func (*TrieStub) SetNewHashes ¶
func (ts *TrieStub) SetNewHashes(_ common.ModifiedHashes)
SetNewHashes -
func (*TrieStub) UpdateWithVersion ¶ added in v1.6.0
UpdateWithVersion -
type TriesHolderStub ¶
type TriesHolderStub struct { PutCalled func([]byte, common.Trie) RemoveCalled func([]byte, common.Trie) GetCalled func([]byte) common.Trie GetAllCalled func() []common.Trie ResetCalled func() }
TriesHolderStub -
func (*TriesHolderStub) IsInterfaceNil ¶
func (ths *TriesHolderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface