simplified few more lines
This commit is contained in:
parent
3a771fc122
commit
3143ff75d0
|
@ -27,7 +27,7 @@ impl Compact {
|
|||
let mut word = self.0 & 0x007fffff;
|
||||
|
||||
let result = if size <= 3 {
|
||||
word = word >> (8 * (3 - size as usize));
|
||||
word >>= (8 * (3 - size as usize));
|
||||
word.into()
|
||||
} else {
|
||||
U256::from(word) << (8 * (size as usize - 3))
|
||||
|
@ -55,7 +55,7 @@ impl Compact {
|
|||
};
|
||||
|
||||
if (compact & 0x00800000) != 0 {
|
||||
compact = compact >> 8;
|
||||
compact >>= 8;
|
||||
size += 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -179,8 +179,4 @@ mod tests {
|
|||
let nbits = 404129525;
|
||||
assert!(check_nbits(&hash, nbits));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn threshold() {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue