Class ActionEvaluator<T>
Class responsible for handling of IAction evaluations.
Namespace: Libplanet.Action
Assembly: Libplanet.dll
Syntax
public class ActionEvaluator<T> : object where T : IAction, new()
Type Parameters
Constructors
| Improve this Doc View SourceActionEvaluator(IAction, IBlockChainStates<T>, Nullable<Func<BlockHash, ITrie>>, Nullable<BlockHash>, Predicate<Currency>)
Creates a new ActionEvaluator<T>.
Declaration
public ActionEvaluator(IAction policyBlockAction, IBlockChainStates<T> blockChainStates, Func<BlockHash, ITrie>? trieGetter, BlockHash? genesisHash, Predicate<Currency> nativeTokenPredicate)
Parameters
Type | Name | Description |
---|---|---|
IAction | policyBlockAction | The IAction provided by
Block |
IBlock |
blockChainStates | The IBlockChainStates<T> to use to retrieve the states for a provided Address. |
Nullable<Func<Block |
trieGetter | The function to retrieve a trie for
a provided Block |
Nullable<Block |
genesisHash | A Block |
Predicate<Currency> | nativeTokenPredicate | A predicate function to determine whether
the specified Currency is a native token defined by chain's
Native |
Methods
| Improve this Doc View SourceEvaluate(IPreEvaluationBlock<T>, StateCompleterSet<T>)
The main entry point for evaluating a Block<T>.
Declaration
public IReadOnlyList<ActionEvaluation> Evaluate(IPreEvaluationBlock<T> block, StateCompleterSet<T> stateCompleterSet)
Parameters
Type | Name | Description |
---|---|---|
IPre |
block | The block to evaluate. |
State |
stateCompleterSet | The StateCompleterSet<T> to use. |
Returns
Type | Description |
---|---|
IRead |
The result of evaluating every IAction related to
|
Remarks
Publicly exposed for benchmarking.
First evaluates all IActions in Transactions
of block
and appends the evaluation of
the Block