Show / Hide Table of Contents

Class CommittedActionContext

Inheritance
System.Object
CommittedActionContext
Implements
ICommittedActionContext
Namespace: Libplanet.Action
Assembly: Libplanet.Action.dll
Syntax
public class CommittedActionContext : object, ICommittedActionContext

Constructors

| Improve this Doc View Source

CommittedActionContext(IActionContext)

Declaration
public CommittedActionContext(IActionContext context)
Parameters
Type Name Description
IActionContext context
| Improve this Doc View Source

CommittedActionContext(Address, Nullable<TxId>, Address, Int64, Int32, HashDigest<SHA256>, Int32, Boolean)

Declaration
public CommittedActionContext(Address signer, TxId? txId, Address miner, long blockIndex, int blockProtocolVersion, HashDigest<SHA256> previousState, int randomSeed, bool isPolicyAction)
Parameters
Type Name Description
Address signer
System.Nullable<TxId> txId
Address miner
System.Int64 blockIndex
System.Int32 blockProtocolVersion
HashDigest<SHA256> previousState
System.Int32 randomSeed
System.Boolean isPolicyAction

Properties

| Improve this Doc View Source

BlockIndex

The Index of the Block that contains the IAction.

Declaration
public long BlockIndex { get; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

BlockProtocolVersion

The ProtocolVersion of the Block that contains the IAction.

Declaration
public int BlockProtocolVersion { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

IsPolicyAction

Whether this action is executed as a policy action. false if it belongs to a transaction.

Declaration
public bool IsPolicyAction { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Miner

The Miner of the Block that contains the IAction.

Declaration
public Address Miner { get; }
Property Value
Type Description
Address
| Improve this Doc View Source

PreviousState

The state root hash of the previous state.

Declaration
public HashDigest<SHA256> PreviousState { get; }
Property Value
Type Description
HashDigest<SHA256>
| Improve this Doc View Source

RandomSeed

The random seed to use for pseudorandom number generator. This value is determined by various block properties, the signature of the transaction containing the action to execute, and index of the action to execute, which is deterministic so that every node can replay the same action and then reproduce the same result, while neither a single block miner nor a single transaction signer can predict the result and cheat.

Declaration
public int RandomSeed { get; }
Property Value
Type Description
System.Int32
See Also
GetRandom()
| Improve this Doc View Source

Signer

The Signer of the Transaction that contains the IAction to be executed. If the IAction is not part of a Transaction, e.g. , this is set to Miner instead.

Declaration
public Address Signer { get; }
Property Value
Type Description
Address
| Improve this Doc View Source

TxId

The Id of the Transaction that contains the IAction. If the IAction is not part of a Transaction, e.g. , this is set to null.

Declaration
public TxId? TxId { get; }
Property Value
Type Description
System.Nullable<TxId>

Methods

| Improve this Doc View Source

GetRandom()

Returns a newly initialized IRandom using RandomSeed as its seed value.

Declaration
public IRandom GetRandom()
Returns
Type Description
IRandom

A newly initialized IRandom using RandomSeed as its seed value.

Implements

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