Documentation ¶
Index ¶
- type RangeScanIterator
- type StateSnapshotIterator
- type StateTrie
- func (stateTrie *StateTrie) AddChangesForPersistence(writeBatch *gorocksdb.WriteBatch) error
- func (stateTrie *StateTrie) ClearWorkingSet(changesPersisted bool)
- func (stateTrie *StateTrie) ComputeCryptoHash() ([]byte, error)
- func (stateTrie *StateTrie) Get(chaincodeID string, key string) ([]byte, error)
- func (stateTrie *StateTrie) GetRangeScanIterator(chaincodeID string, startKey string, endKey string) (statemgmt.RangeScanIterator, error)
- func (stateTrie *StateTrie) GetStateSnapshotIterator(snapshot *gorocksdb.Snapshot) (statemgmt.StateSnapshotIterator, error)
- func (stateTrie *StateTrie) Initialize(configs map[string]interface{}) error
- func (stateTrie *StateTrie) PerfHintKeyChanged(chaincodeID string, key string)
- func (stateTrie *StateTrie) PrepareWorkingSet(stateDelta *statemgmt.StateDelta) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RangeScanIterator ¶
type RangeScanIterator struct {
// contains filtered or unexported fields
}
RangeScanIterator implements the interface 'statemgmt.RangeScanIterator'
func (*RangeScanIterator) Close ¶
func (itr *RangeScanIterator) Close()
Close - see interface 'statemgmt.RangeScanIterator' for details
func (*RangeScanIterator) GetKeyValue ¶
func (itr *RangeScanIterator) GetKeyValue() (string, []byte)
GetKeyValue - see interface 'statemgmt.RangeScanIterator' for details
func (*RangeScanIterator) Next ¶
func (itr *RangeScanIterator) Next() bool
Next - see interface 'statemgmt.RangeScanIterator' for details
type StateSnapshotIterator ¶
type StateSnapshotIterator struct {
// contains filtered or unexported fields
}
StateSnapshotIterator implements the interface 'statemgmt.StateSnapshotIterator'
func (*StateSnapshotIterator) Close ¶
func (snapshotItr *StateSnapshotIterator) Close()
Close - see interface 'statemgmt.StateSnapshotIterator' for details
func (*StateSnapshotIterator) GetRawKeyValue ¶
func (snapshotItr *StateSnapshotIterator) GetRawKeyValue() ([]byte, []byte)
GetRawKeyValue - see interface 'statemgmt.StateSnapshotIterator' for details
func (*StateSnapshotIterator) Next ¶
func (snapshotItr *StateSnapshotIterator) Next() bool
Next - see interface 'statemgmt.StateSnapshotIterator' for details
type StateTrie ¶
type StateTrie struct {
// contains filtered or unexported fields
}
StateTrie defines the trie for the state, a merkle tree where keys and values are stored for fast hash computation.
func (*StateTrie) AddChangesForPersistence ¶
func (stateTrie *StateTrie) AddChangesForPersistence(writeBatch *gorocksdb.WriteBatch) error
AddChangesForPersistence commits current changes to the database
func (*StateTrie) ClearWorkingSet ¶
ClearWorkingSet clears the existing delta
func (*StateTrie) ComputeCryptoHash ¶
ComputeCryptoHash returns the hash of the current state trie
func (*StateTrie) GetRangeScanIterator ¶
func (stateTrie *StateTrie) GetRangeScanIterator(chaincodeID string, startKey string, endKey string) (statemgmt.RangeScanIterator, error)
GetRangeScanIterator returns an iterator for performing a range scan between the start and end keys
func (*StateTrie) GetStateSnapshotIterator ¶
func (stateTrie *StateTrie) GetStateSnapshotIterator(snapshot *gorocksdb.Snapshot) (statemgmt.StateSnapshotIterator, error)
GetStateSnapshotIterator - method implementation for interface 'statemgmt.HashableState'
func (*StateTrie) Initialize ¶
Initialize the state trie with the root key
func (*StateTrie) PerfHintKeyChanged ¶
PerfHintKeyChanged is currently a no-op. Can perform pre-fetching of relevant data from db here.
func (*StateTrie) PrepareWorkingSet ¶
func (stateTrie *StateTrie) PrepareWorkingSet(stateDelta *statemgmt.StateDelta) error
PrepareWorkingSet creates the start of a new delta