Documentation ¶
Index ¶
- type CheckpointHashesHolderStub
- func (c *CheckpointHashesHolderStub) IsInterfaceNil() bool
- func (c *CheckpointHashesHolderStub) Put(rootHash []byte, hashes common.ModifiedHashes) bool
- func (c *CheckpointHashesHolderStub) Remove(hash []byte)
- func (c *CheckpointHashesHolderStub) RemoveCommitted(lastCommittedRootHash []byte)
- func (c *CheckpointHashesHolderStub) ShouldCommit(hash []byte) bool
- type DataTrieTrackerStub
- func (dtts *DataTrieTrackerStub) ClearDataCaches()
- func (dtts *DataTrieTrackerStub) DataTrie() common.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 common.Trie)
- type MockStatistics
- type SnapshotPruningStorerStub
- func (spss *SnapshotPruningStorerStub) GetFromCurrentEpoch(key []byte) ([]byte, error)
- func (spss *SnapshotPruningStorerStub) GetFromLastEpoch(key []byte) ([]byte, error)
- func (spss *SnapshotPruningStorerStub) GetFromOldEpochsWithoutAddingToCache(key []byte) ([]byte, error)
- func (spss *SnapshotPruningStorerStub) GetLatestStorageEpoch() (uint32, error)
- func (spss *SnapshotPruningStorerStub) PutInEpochWithoutCache(key []byte, data []byte, epoch uint32) error
- func (spss *SnapshotPruningStorerStub) RemoveFromCurrentEpoch(key []byte) error
- type TrieStub
- func (ts *TrieStub) Close() 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) (chan core.KeyValueHolder, error)
- func (ts *TrieStub) GetDirtyHashes() (common.ModifiedHashes, error)
- func (ts *TrieStub) GetNumNodes() common.NumNodesDTO
- 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) Recreate(root []byte) (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) 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 CheckpointHashesHolderStub ¶
type CheckpointHashesHolderStub struct { PutCalled func([]byte, common.ModifiedHashes) bool RemoveCommittedCalled func([]byte) RemoveCalled func([]byte) ShouldCommitCalled func([]byte) bool }
CheckpointHashesHolderStub -
func (*CheckpointHashesHolderStub) IsInterfaceNil ¶
func (c *CheckpointHashesHolderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*CheckpointHashesHolderStub) Put ¶
func (c *CheckpointHashesHolderStub) Put(rootHash []byte, hashes common.ModifiedHashes) bool
Put -
func (*CheckpointHashesHolderStub) Remove ¶
func (c *CheckpointHashesHolderStub) Remove(hash []byte)
Remove -
func (*CheckpointHashesHolderStub) RemoveCommitted ¶
func (c *CheckpointHashesHolderStub) RemoveCommitted(lastCommittedRootHash []byte)
RemoveCommitted -
func (*CheckpointHashesHolderStub) ShouldCommit ¶
func (c *CheckpointHashesHolderStub) ShouldCommit(hash []byte) bool
ShouldCommit -
type DataTrieTrackerStub ¶
type DataTrieTrackerStub struct { ClearDataCachesCalled func() DirtyDataCalled func() map[string][]byte RetrieveValueCalled func(key []byte) ([]byte, error) SaveKeyValueCalled func(key []byte, value []byte) error SetDataTrieCalled func(tr common.Trie) DataTrieCalled func() common.Trie }
DataTrieTrackerStub -
func (*DataTrieTrackerStub) ClearDataCaches ¶
func (dtts *DataTrieTrackerStub) ClearDataCaches()
ClearDataCaches -
func (*DataTrieTrackerStub) DataTrie ¶
func (dtts *DataTrieTrackerStub) DataTrie() common.Trie
DataTrie -
func (*DataTrieTrackerStub) DirtyData ¶
func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte
DirtyData -
func (*DataTrieTrackerStub) IsInterfaceNil ¶
func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*DataTrieTrackerStub) RetrieveValue ¶
func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, error)
RetrieveValue -
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 ¶ added in v1.3.0
type MockStatistics struct { WaitForSnapshotsToFinishCalled func() // contains filtered or unexported fields }
MockStatistics -
func (*MockStatistics) AddSize ¶ added in v1.3.0
func (m *MockStatistics) AddSize(size uint64)
AddSize -
func (*MockStatistics) NewDataTrie ¶ added in v1.3.0
func (m *MockStatistics) NewDataTrie()
NewDataTrie -
func (*MockStatistics) NewSnapshotStarted ¶ added in v1.3.0
func (m *MockStatistics) NewSnapshotStarted()
NewSnapshotStarted -
func (*MockStatistics) SnapshotFinished ¶ added in v1.3.0
func (m *MockStatistics) SnapshotFinished()
SnapshotFinished -
func (*MockStatistics) WaitForSnapshotsToFinish ¶ added in v1.3.0
func (m *MockStatistics) WaitForSnapshotsToFinish()
WaitForSnapshotsToFinish -
type SnapshotPruningStorerStub ¶ added in v1.3.0
type SnapshotPruningStorerStub struct { *memorydb.DB GetFromOldEpochsWithoutAddingToCacheCalled func(key []byte) ([]byte, error) GetFromLastEpochCalled func(key []byte) ([]byte, error) GetFromCurrentEpochCalled func(key []byte) ([]byte, error) PutInEpochWithoutCacheCalled func(key []byte, data []byte, epoch uint32) error GetLatestStorageEpochCalled func() (uint32, error) RemoveFromCurrentEpochCalled func(key []byte) error }
SnapshotPruningStorerStub -
func (*SnapshotPruningStorerStub) GetFromCurrentEpoch ¶ added in v1.3.0
func (spss *SnapshotPruningStorerStub) GetFromCurrentEpoch(key []byte) ([]byte, error)
GetFromCurrentEpoch -
func (*SnapshotPruningStorerStub) GetFromLastEpoch ¶ added in v1.3.0
func (spss *SnapshotPruningStorerStub) GetFromLastEpoch(key []byte) ([]byte, error)
GetFromLastEpoch -
func (*SnapshotPruningStorerStub) GetFromOldEpochsWithoutAddingToCache ¶ added in v1.3.0
func (spss *SnapshotPruningStorerStub) GetFromOldEpochsWithoutAddingToCache(key []byte) ([]byte, error)
GetFromOldEpochsWithoutAddingToCache -
func (*SnapshotPruningStorerStub) GetLatestStorageEpoch ¶ added in v1.3.0
func (spss *SnapshotPruningStorerStub) GetLatestStorageEpoch() (uint32, error)
GetLatestStorageEpoch -
func (*SnapshotPruningStorerStub) PutInEpochWithoutCache ¶ added in v1.3.0
func (spss *SnapshotPruningStorerStub) PutInEpochWithoutCache(key []byte, data []byte, epoch uint32) error
PutInEpochWithoutCache -
func (*SnapshotPruningStorerStub) RemoveFromCurrentEpoch ¶ added in v1.3.7
func (spss *SnapshotPruningStorerStub) RemoveFromCurrentEpoch(key []byte) error
RemoveFromCurrentEpoch -
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) CommitCalled func() error RecreateCalled func(root []byte) (common.Trie, error) GetObsoleteHashesCalled func() [][]byte AppendToOldHashesCalled func([][]byte) GetSerializedNodesCalled func([]byte, uint64) ([][]byte, uint64, error) GetAllHashesCalled func() ([][]byte, error) GetAllLeavesOnChannelCalled func(rootHash []byte) (chan core.KeyValueHolder, 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) GetNumNodesCalled func() common.NumNodesDTO GetOldRootCalled func() []byte CloseCalled func() error }
TrieStub -
func (*TrieStub) GetAllLeavesOnChannel ¶
func (ts *TrieStub) GetAllLeavesOnChannel(rootHash []byte) (chan core.KeyValueHolder, 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) SetNewHashes ¶
func (ts *TrieStub) SetNewHashes(_ common.ModifiedHashes)
SetNewHashes -
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