Expand description
Consensus check functions
Functions§
- body_
matches_ header - Returns
Ok(())ifblock’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(())ifblock’s header commits toheight, 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(())ifhashpasses: - difficulty_
threshold_ is_ valid - Returns
Ok(ExpandedDifficulty)if thedifficulty_thresholdofheaderis at least as difficult as the target difficulty limit fornetwork(PoWLimit) - equihash_
solution_ is_ valid - Returns
Ok(())if theEquihashSolutionis valid forheader - 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
CoinbaseTransactionErrorfrom the subsidy checks into theBlockErrorthe block verifier reports for it. - subsidy_
is_ valid - Returns
Ok()with the deferred pool balance change of the coinbase transaction if the block subsidy inblockis valid fornetwork - time_
is_ valid_ at - Returns
Ok(())ifheader.timeis less than or equal to 2 hours in the future, according to the node’s local clock (now).