Fix shift by 1 block in TUI (#1780) (#1810)

* Fix shift by 1 block in TUI (#1780)
* Only use graph_weight
* Fix shift by 1 in block
* Remove debug logging
This commit is contained in:
Quentin Le Sceller
2018-10-22 19:44:14 +02:00
committed by Ignotus Peverell
parent d11088c987
commit 5f2e8db092
3 changed files with 3 additions and 10 deletions
-5
View File
@@ -76,11 +76,6 @@ impl Difficulty {
Difficulty { num: max(num, 1) }
}
/// Compute difficulty scaling factor for graph defined by 2 * 2^edge_bits * edge_bits bits
pub fn scale(edge_bits: u8) -> u64 {
(2 << (edge_bits - global::base_edge_bits()) as u64) * (edge_bits as u64)
}
/// Computes the difficulty from a hash. Divides the maximum target by the
/// provided hash and applies the Cuck(at)oo size adjustment factor (see
/// https://lists.launchpad.net/mimblewimble/msg00494.html).