Show / Hide Table of Contents

Class StoreExtensions

Convenient extension methods for IStore.

Inheritance
System.Object
StoreExtensions
Namespace: Libplanet.Store
Assembly: Libplanet.Store.dll
Syntax
public static class StoreExtensions : object

Methods

| Improve this Doc View Source

Copy(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.

| Improve this Doc View Source

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.

System.Nullable<BlockHash> blockHash

The hash of the block to get the state root hash of. This can be null.

Returns
Type Description
System.Nullable<HashDigest<SHA256>>

The state root hash of the block associated with blockHash if found or null if blockHash is itself null.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium