Function grin_core::consensus::next_dma_difficulty
source · pub fn next_dma_difficulty<T>(height: u64, cursor: T) -> HeaderDifficultyInfowhere
T: IntoIterator<Item = HeaderDifficultyInfo>,
Expand description
Difficulty calculation based on a Damped Moving Average of difficulty over a window of DMA_WINDOW blocks. The corresponding timespan is calculated by using the difference between the timestamps at the beginning and the end of the window, with a damping toward the target block time.