found last few instrances of Difficulty::one

This commit is contained in:
John Tromp 2018-10-18 23:29:32 +02:00
parent 846b38308c
commit b1ebfe1c73
2 changed files with 2 additions and 8 deletions

View file

@ -141,12 +141,12 @@ mod test {
b.header.pow.nonce = 485;
pow_size(
&mut b.header,
Difficulty::one(),
Difficulty::min(),
global::proofsize(),
global::min_edge_bits(),
).unwrap();
assert!(b.header.pow.nonce != 310);
assert!(b.header.pow.to_difficulty() >= Difficulty::one());
assert!(b.header.pow.to_difficulty() >= Difficulty::min());
assert!(verify_size(&b.header, global::min_edge_bits()).is_ok());
}
}

View file

@ -64,12 +64,6 @@ impl Difficulty {
Difficulty { num: 0 }
}
/// Difficulty of one, which is the minimum difficulty
/// (when the hash equals the max target)
pub fn one() -> Difficulty {
Difficulty { num: 1 }
}
/// Difficulty of MIN_DIFFICULTY
pub fn min() -> Difficulty {
Difficulty { num: MIN_DIFFICULTY }