Show / Hide Table of Contents

Interface IStateStore

An interface to store states.

Namespace: Libplanet.Store
Assembly: Libplanet.dll
Syntax
public interface IStateStore : IDisposable

Methods

| Improve this Doc View Source

GetStateRoot(Nullable<HashDigest<SHA256>>)

Gets the state root trie of the stateRootHash from the state store.

Declaration
ITrie GetStateRoot(HashDigest<SHA256>? stateRootHash)
Parameters
Type Name Description
Nullable<HashDigest<SHA256>> stateRootHash

The state root hash of the state root trie to get. If null is passed the empty state root trie is returned.

Returns
Type Description
ITrie

The state root trie of the stateRootHash. If null is passed the empty state root trie is returned.

| Improve this Doc View Source

PruneStates(IImmutableSet<HashDigest<SHA256>>)

Prunes the states no more used from the state store.

Declaration
void PruneStates(IImmutableSet<HashDigest<SHA256>> survivingStateRootHashes)
Parameters
Type Name Description
IImmutableSet<HashDigest<SHA256>> survivingStateRootHashes

The state root hashes not to prune. These state root hashes are guaranteed to survive after pruning.

Extension Methods

StateStoreExtensions.Commit(IStateStore, Nullable<HashDigest<SHA256>>, IImmutableDictionary<String, IValue>, Boolean)
StateStoreExtensions.GetState(IStateStore, String, Nullable<HashDigest<SHA256>>)
StateStoreExtensions.ContainsStateRoot(IStateStore, HashDigest<SHA256>)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2021 Planetarium