Skip to main content

Module difficulty

Module difficulty 

Source
Expand description

Get context and calculate difficulty for the next block.

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 supplied relevant_data, tip, network, history_tree, and captured local time now, or an error if no valid timestamp is available.
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.