pub async fn check_predicate<SA, SB>(
pre_state: &SA,
post_state: &SB,
solution_set: Arc<SolutionSet>,
predicate: Arc<Predicate>,
get_program: &impl GetProgram,
solution_index: SolutionIndex,
config: &CheckPredicateConfig,
) -> Result<Gas, PredicateError<SA::Error>>Expand description
Checks the predicate of the solution within the given set at the given solution_index.
Spawns a task for each of the predicate’s nodes to execute asynchronously. Oneshot channels are used to provide the execution results from parent to child.
NOTE: This assumes that the given SolutionSet and Predicate have been
independently validated using solution::check_set
and predicate::check respectively.
§Arguments
pre_statemust provide access to state prior to mutations being applied.post_statemust provide access to state post mutations being applied.solution_indexrepresents the solution withinsolution_set.solutionsthat claims to solve this predicate.
Returns the total gas spent.