Show / Hide Table of Contents

Interface IBlockChainStates

A minimal interface to get states from a .

Note that implements this interface.

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

Methods

| Improve this Doc View Source

GetWorldState(Nullable<HashDigest<SHA256>>)

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

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

The state root hash for which to create an IWorldState.

Returns
Type Description
IWorldState

The IWorldState with stateRootHash.

Exceptions
Type Condition
ArgumentException

Thrown when no ITrie with hash as its state root hash is found.

See Also
IWorldState
| Improve this Doc View Source

GetWorldState(Nullable<BlockHash>)

Returns the IWorldState in the at offset.

Declaration
IWorldState GetWorldState(BlockHash? offset)
Parameters
Type Name Description
Nullable<BlockHash> offset

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

Returns
Type Description
IWorldState

The IWorldState at offset.

Exceptions
Type Condition
ArgumentException

Thrown when offset is not null and one of the following is true.

  • Corresponding Block is not found in the IStore.
  • Corresponding Block is found but its state root is not found in the IStateStore.
See Also
IWorldState
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium