Simplify an ExpandedDifficulty division

This commit is contained in:
teor 2020-11-26 12:06:15 +10:00
parent d64c2976e3
commit ec6ef93b7b
1 changed files with 2 additions and 3 deletions

View File

@ -211,10 +211,9 @@ impl AdjustedDifficulty {
.expect("difficulty thresholds in previously verified blocks are valid")
})
.sum();
let total: U256 = total.into();
let divisor: U256 = POW_AVERAGING_WINDOW.into();
(total / divisor).into()
let divisor: U256 = POW_AVERAGING_WINDOW.into();
total / divisor
}
/// Calculate the bounded median timespan. The median timespan is the