Migrate zcash_primitives to rand 0.5

This commit is contained in:
Jack Grigg
2019-07-19 00:35:06 +02:00
parent adfc88926b
commit 6149166ccb
5 changed files with 34 additions and 24 deletions
+7 -3
View File
@@ -1,6 +1,10 @@
use ff::Field;
use pairing::bls12_381::Bls12;
use rand::{thread_rng, Rng};
use sapling_crypto::{jubjub::FixedGenerators, redjubjub::PrivateKey};
use rand::thread_rng;
use sapling_crypto::{
jubjub::{fs::Fs, FixedGenerators},
redjubjub::PrivateKey,
};
use super::{
components::{Amount, Script},
@@ -194,7 +198,7 @@ fn tx_write_rejects_unexpected_binding_sig() {
// Fails with an unexpected binding signature
{
let rng = &mut thread_rng();
let sk = PrivateKey::<Bls12>(rng.gen());
let sk = PrivateKey::<Bls12>(Fs::random(rng));
let sig = sk.sign(
b"Foo bar",
rng,