Fix cuckoo20 sizeshift in test

This commit is contained in:
Ignotus Peverell 2018-06-30 05:07:24 +01:00
parent 1398e0bf85
commit f0d5406d0b
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211

View file

@ -352,17 +352,23 @@ mod test {
let nonces1 = Miner::from_hash(blake2(&[49]).as_bytes(), 75, 42, 20) let nonces1 = Miner::from_hash(blake2(&[49]).as_bytes(), 75, 42, 20)
.mine() .mine()
.unwrap(); .unwrap();
assert_eq!(Proof::new(V1.to_vec()), nonces1); let mut proof = Proof::new(V1.to_vec());
proof.cuckoo_sizeshift = 20;
assert_eq!(proof, nonces1);
let nonces2 = Miner::from_hash(blake2(&[50]).as_bytes(), 70, 42, 20) let nonces2 = Miner::from_hash(blake2(&[50]).as_bytes(), 70, 42, 20)
.mine() .mine()
.unwrap(); .unwrap();
assert_eq!(Proof::new(V2.to_vec()), nonces2); let mut proof = Proof::new(V2.to_vec());
proof.cuckoo_sizeshift = 20;
assert_eq!(proof, nonces2);
let nonces3 = Miner::from_hash(blake2(&[51]).as_bytes(), 70, 42, 20) let nonces3 = Miner::from_hash(blake2(&[51]).as_bytes(), 70, 42, 20)
.mine() .mine()
.unwrap(); .unwrap();
assert_eq!(Proof::new(V3.to_vec()), nonces3); let mut proof = Proof::new(V3.to_vec());
proof.cuckoo_sizeshift = 20;
assert_eq!(proof, nonces3);
} }
#[test] #[test]