Show / Hide Table of Contents

Interface IBlockChainStates

A minimal interface to get states from a BlockChain.

Note that BlockChain implements this interface.

Namespace: Libplanet.Action.State
Assembly: Libplanet.Action.dll
Syntax
public interface IBlockChainStates

Methods

| Improve this Doc View Source

GetWorldState(BlockHash)

Returns the IWorldState in the BlockChain at offset.

Declaration
IWorldState GetWorldState(BlockHash offset)
Parameters
Type Name Description
BlockHash offset

The BlockHash of the Block to create for which to create an IWorldState.

Returns
Type Description
IWorldState

The IWorldState at offset, which is the identical to what StateRootHash of offset indicates.

See Also
IWorldState
| Improve this Doc View Source

GetWorldState(Nullable<HashDigest<SHA256>>)

Returns the IWorldState in the BlockChain's state storage with stateRootHash.

Declaration
IWorldState GetWorldState(HashDigest<SHA256>? stateRootHash)
Parameters
Type Name Description
System.Nullable<HashDigest<SHA256>> stateRootHash

The state root hash for which to create an IWorldState.

Returns
Type Description
IWorldState

The IWorldState with stateRootHash. If stateRootHash is null, returns an empty IWorldState.

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