Expand description
Get context and calculate difficulty for the next block.
Constants§
- EXTRA_
TIME_ TO_ MINE_ A_ BLOCK - The amount of extra time we allow for a miner to mine a standard difficulty block on testnet.
Functions§
- adjust_
difficulty_ 🔒and_ time_ for_ testnet - Adjust the difficulty and time for the testnet minimum difficulty rule.
- best_
relevant_ 🔒chain_ and_ history_ tree - Do a consistency check by checking the finalized tip before and after all other database queries.
- difficulty_
time_ 🔒and_ history_ tree - Returns the
GetBlockTemplateChainInfo
for the suppliedrelevant_chain
, tip,network
, andhistory_tree
. - get_
block_ template_ chain_ info - Returns the
GetBlockTemplateChainInfo
for the current best chain. - solution_
rate - Accepts a
non_finalized_state
,ZebraDb
,num_blocks
, and a block hash to start at.