Expand description
Consensus check functions
Functions§
- 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(())
ifhash
passes: - difficulty_
threshold_ is_ valid - Returns
Ok(ExpandedDifficulty)
if thedifficulty_threshold
ofheader
is at least as difficult as the target difficulty limit fornetwork
(PoWLimit) - equihash_
solution_ is_ valid - Returns
Ok(())
if theEquihashSolution
is valid forheader
- merkle_
root_ validity - Check Merkle root validity.
- miner_
fees_ are_ valid - Returns
Ok(())
if the miner fees consensus rule is valid. - subsidy_
is_ valid - Returns
Ok(())
if the block subsidy inblock
is valid fornetwork
- time_
is_ valid_ at - Returns
Ok(())
ifheader.time
is less than or equal to 2 hours in the future, according to the node’s local clock (now
).