Show / Hide Table of Contents

Class ActionEvaluator

Class responsible for handling of IAction evaluations.

Inheritance
Object
ActionEvaluator
Implements
IActionEvaluator
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Libplanet.Action
Assembly: Libplanet.dll
Syntax
public class ActionEvaluator : IActionEvaluator

Constructors

| Improve this Doc View Source

ActionEvaluator(PolicyBlockActionGetter, IBlockChainStates, IActionLoader, IFeeCalculator)

Creates a new ActionEvaluator.

Declaration
public ActionEvaluator(PolicyBlockActionGetter policyBlockActionGetter, IBlockChainStates blockChainStates, IActionLoader actionTypeLoader, IFeeCalculator feeCalculator)
Parameters
Type Name Description
PolicyBlockActionGetter policyBlockActionGetter

A delegator to get policy block action to evaluate at the end for each IPreEvaluationBlock that gets evaluated.

IBlockChainStates blockChainStates

The IBlockChainStates to use to retrieve the states for a provided Address.

IActionLoader actionTypeLoader

A IActionLoader implementation using action type lookup.

IFeeCalculator feeCalculator

Fee calculator.

Properties

| Improve this Doc View Source

ActionLoader

The IActionLoader used by this IActionEvaluator when evaluating Blocks.

Declaration
[Pure]
public IActionLoader ActionLoader { get; }
Property Value
Type Description
IActionLoader

Methods

| Improve this Doc View Source

Evaluate(IPreEvaluationBlock)

The main entry point for evaluating a IPreEvaluationBlock.

Declaration
[Pure]
public IReadOnlyList<IActionEvaluation> Evaluate(IPreEvaluationBlock block)
Parameters
Type Name Description
IPreEvaluationBlock block

The block to evaluate.

Returns
Type Description
IReadOnlyList<IActionEvaluation>

The result of evaluating every IAction related to block as an IReadOnlyList<T> of ActionEvaluations.

Remarks

Publicly exposed for benchmarking.

First evaluates all IActions in Transactions of block and appends the evaluation of the BlockAction held by the instance at the end.

| Improve this Doc View Source

GenerateRandomSeed(Byte[], Byte[], Byte[], Int32)

Creates a random seed.

Declaration
[Pure]
public static int GenerateRandomSeed(byte[] preEvaluationHashBytes, byte[] hashedSignature, byte[] signature, int actionOffset)
Parameters
Type Name Description
Byte[] preEvaluationHashBytes

The previous evaluation hash turned into bytes.

Byte[] hashedSignature

The hashed signature.

Byte[] signature

The signature.

Int32 actionOffset

The offset of the action.

Returns
Type Description
Int32

An integer of the random seed.

Implements

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