Module validate

Source
Expand description

§Validation

Functions for validating blocks and solutions.

Structs§

InvalidOutcome
Outcome of an invalid block. Contains the failure reason and the index of the solution that caused the failure.
ValidOutcome
Outcome of a valid block. Cumulative gas and utilities of all solutions in the block.

Enums§

ValidateFailure
Reasons for a block to be invalid. Contains the error that caused the block to be invalid.
ValidateOutcome
Result of validating a block.

Functions§

next_key
Calculate the next key.
validate_dry_run
Validates a block without adding the block to the database.
validate_solution_set_dry_run
Validates a solution without adding it to the database. Creates a block at the next block number and current timestamp with the given solution set and validates it.