Skip to main content

difficulty_time_and_history_tree

Function difficulty_time_and_history_tree 

Source
fn difficulty_time_and_history_tree(
    relevant_data: Vec<(CompactDifficulty, DateTime<Utc>)>,
    tip_height: Height,
    tip_hash: Hash,
    network: &Network,
    history_tree: Arc<HistoryTree>,
    chain_value_pools: ValueBalance<NonNegative>,
    now: DateTime32,
) -> Result<GetBlockTemplateChainInfo, BoxError>
Expand description

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.

The relevant_data has header difficulties and times in reverse height order from the tip.

See get_block_template_chain_info() for details.