simplified few more lines

This commit is contained in:
debris 2016-11-25 02:05:49 +01:00
parent 3a771fc122
commit 3143ff75d0
2 changed files with 2 additions and 6 deletions

View File

@ -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;
}

View File

@ -179,8 +179,4 @@ mod tests {
let nbits = 404129525;
assert!(check_nbits(&hash, nbits));
}
#[test]
fn threshold() {
}
}