Interface IStateStore
An interface to store states.
Inherited Members
Namespace: Libplanet.Store
Assembly: Libplanet.Store.dll
Syntax
public interface IStateStore : IDisposable
Methods
| Improve this Doc View SourceCommit(ITrie)
Commits given trie
to storage.
Returned ITrie must be identical to the one obtained from
GetStateRoot(Nullable<HashDigest<SHA256>>) with resulting ITrie's
Hash.
Declaration
ITrie Commit(ITrie trie)
Parameters
Type | Name | Description |
---|---|---|
ITrie | trie | The ITrie to commit. |
Returns
Type | Description |
---|---|
ITrie | The committed ITrie. The committed ITrie's Root is guaranteed to be either null or a HashNode. |
Remarks
Given trie
must have originated from the same instance
(or with an instance with the same reference to an IKeyValueStore).
Otherwise, this is not guaranteed to work properly.
See Also
| Improve this Doc View SourceGetStateRoot(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 |