pub fn calculate_td_by_number<P>(provider: &P, num: BlockNumber) -> Result<U256>where
P: BlockReader,Expand description
Imports history from ERA files. Calculates the total difficulty for a given block number by summing the difficulty of all blocks from genesis to the given block.
Very expensive - iterates through all blocks in batches of 1000.
Returns an error if any block is missing.