mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
found last few instrances of Difficulty::one
This commit is contained in:
parent
846b38308c
commit
b1ebfe1c73
2 changed files with 2 additions and 8 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue