Fixed usages of block constructor.

This commit is contained in:
Ignotus Peverell
2016-11-30 11:15:23 -08:00
parent 715cc44d93
commit ea1820cff7
2 changed files with 4 additions and 4 deletions
+1 -1
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
+3 -3
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();
}