mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-07-31 12:31:22 +00:00
Migrate to rand 0.7
This commit is contained in:
@@ -11,6 +11,6 @@ blake2b_simd = "0.5"
|
||||
byteorder = "1"
|
||||
ff = { path = "../ff" }
|
||||
pairing = { path = "../pairing" }
|
||||
rand_os = "0.1"
|
||||
rand_os = "0.2"
|
||||
sapling-crypto = { path = "../sapling-crypto" }
|
||||
zcash_primitives = { path = "../zcash_primitives" }
|
||||
|
@@ -56,7 +56,7 @@ impl SaplingProvingContext {
|
||||
(),
|
||||
> {
|
||||
// Initialize secure RNG
|
||||
let mut rng = OsRng::new().expect("should be able to construct RNG");
|
||||
let mut rng = OsRng;
|
||||
|
||||
// We create the randomness of the value commitment
|
||||
let rcv = Fs::random(&mut rng);
|
||||
@@ -189,7 +189,7 @@ impl SaplingProvingContext {
|
||||
params: &JubjubBls12,
|
||||
) -> (Proof<Bls12>, edwards::Point<Bls12, Unknown>) {
|
||||
// Initialize secure RNG
|
||||
let mut rng = OsRng::new().expect("should be able to construct RNG");
|
||||
let mut rng = OsRng;
|
||||
|
||||
// We construct ephemeral randomness for the value commitment. This
|
||||
// randomness is not given back to the caller, but the synthetic
|
||||
@@ -250,7 +250,7 @@ impl SaplingProvingContext {
|
||||
params: &JubjubBls12,
|
||||
) -> Result<Signature, ()> {
|
||||
// Initialize secure RNG
|
||||
let mut rng = OsRng::new().expect("should be able to construct RNG");
|
||||
let mut rng = OsRng;
|
||||
|
||||
// Grab the current `bsk` from the context
|
||||
let bsk = PrivateKey::<Bls12>(self.bsk);
|
||||
|
Reference in New Issue
Block a user