pub fn check_set_predicates<S>(
state: &S,
solution_set: Arc<SolutionSet>,
get_predicate: impl GetPredicate + Sync,
get_program: impl 'static + Clone + GetProgram + Send + Sync,
config: Arc<CheckPredicateConfig>,
run_mode: RunMode,
cache: &mut HashMap<SolutionIndex, Cache>,
) -> Result<Outputs, PredicatesError<S::Error>>Expand description
Checks all of a SolutionSet’s Solutions against their associated Predicates.
For each solution, we load the associated predicate and its programs and execute each
in parallel and in topological order. The leaf nodes are treated as constraints or data outputs and if
any constraint returns false, the whole solution set is considered to be invalid.
NOTE: This assumes that the given SolutionSet and all Predicates have already
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.
Returns the total gas spent.