Skip to main content

Module check

Module check 

Source
Expand description

Consensus check functions

Functions§

body_matches_header
Returns Ok(()) if block’s header commits to its transaction IDs, and to the height in its coinbase input, if it has one.
coinbase_height_is_committed
Returns Ok(()) if block’s header commits to height, the height in its coinbase input.
coinbase_is_first
Checks if there is exactly one coinbase transaction in Block, and if that coinbase transaction is the first transaction in the block. Returns the coinbase transaction is successful.
difficulty_is_valid
Returns Ok(()) if hash passes:
difficulty_threshold_is_valid
Returns Ok(ExpandedDifficulty) if thedifficulty_threshold of header is at least as difficult as the target difficulty limit for network (PoWLimit)
equihash_solution_is_valid
Returns Ok(()) if the EquihashSolution is valid for header
merkle_root_validity
Check Merkle root validity.
miner_fees_are_valid
Returns Ok(()) if the miner fees consensus rule is valid.
shielded_action_limits_are_valid
Checks the ZIP 218 per-pool and global shielded action limits for block.
subsidy_block_error 🔒
Converts a CoinbaseTransactionError from the subsidy checks into the BlockError the block verifier reports for it.
subsidy_is_valid
Returns Ok() with the deferred pool balance change of the coinbase transaction if the block subsidy in block is valid for network
time_is_valid_at
Returns Ok(()) if header.time is less than or equal to 2 hours in the future, according to the node’s local clock (now).