Class StoreExtensions
Convenient extension methods for IStore.
Namespace: Libplanet.Store
Assembly: Libplanet.dll
Syntax
public static class StoreExtensions : object
Methods
| Improve this Doc View SourceCopy(IStore, IStore)
Makes a store, to
, logically (but not necessarily physically)
identical to another store, from
. As this copies the contents
of the store, instead of its physicall data, this can be used for migrating
between two different types of IStore implementations.
Declaration
public static void Copy(this IStore from, IStore to)
Parameters
Type | Name | Description |
---|---|---|
IStore | from | The store containing the source contents. |
IStore | to | The store to contain the copied contents. Expected to be empty. |
GetStateRootHash(IStore, Nullable<BlockHash>)
Gets the StateRootHash of the given blockHash
.
Declaration
public static HashDigest<SHA256>? GetStateRootHash(this IStore store, BlockHash? blockHash)
Parameters
Type | Name | Description |
---|---|---|
IStore | store | The store that blocks are stored. |
Nullable<BlockHash> | blockHash | The hash of the block to get the state root hash of.
If |
Returns
Type | Description |
---|---|
Nullable<HashDigest<SHA256>> | The state root hash of the block, or |