Fixed usages of block constructor.

This commit is contained in:
Ignotus Peverell 2016-11-30 11:15:23 -08:00
parent 715cc44d93
commit ea1820cff7
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211
2 changed files with 4 additions and 4 deletions

View file

@ -402,7 +402,7 @@ mod test {
fn new_block(txs: Vec<&mut Transaction>, secp: &Secp256k1) -> Block {
let mut rng = OsRng::new().unwrap();
let skey = SecretKey::new(secp, &mut rng);
Block::new(BlockHeader::default(), txs, skey).unwrap()
Block::new(&BlockHeader::default(), txs, skey).unwrap()
}
// utility producing a transaction that spends the above

View file

@ -247,7 +247,7 @@ mod test {
let ref secp = new_secp();
let skey = SecretKey::new(secp, &mut rng);
let b = Block::new(BlockHeader::default(), vec![], skey).unwrap();
let b = Block::new(&BlockHeader::default(), vec![], skey).unwrap();
b.compact().verify(&secp).unwrap();
}
@ -261,7 +261,7 @@ mod test {
let mut btx1 = tx1.blind(&secp).unwrap();
btx1.verify_sig(&secp).unwrap();
let b = Block::new(BlockHeader::default(), vec![&mut btx1], skey).unwrap();
let b = Block::new(&BlockHeader::default(), vec![&mut btx1], skey).unwrap();
b.compact().verify(&secp).unwrap();
}
@ -279,7 +279,7 @@ mod test {
let mut btx2 = tx2.blind(&secp).unwrap();
btx2.verify_sig(&secp).unwrap();
let b = Block::new(BlockHeader::default(), vec![&mut btx1, &mut btx2], skey).unwrap();
let b = Block::new(&BlockHeader::default(), vec![&mut btx1, &mut btx2], skey).unwrap();
b.verify(&secp).unwrap();
}