We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dbc778 commit 8c9d728Copy full SHA for 8c9d728
stacks-common/src/util/vrf.rs
@@ -299,10 +299,14 @@ impl VRFProof {
299
300
c_buf[..16].copy_from_slice(&bytes[32..(16 + 32)]);
301
s_buf[..32].copy_from_slice(&bytes[48..(32 + 48)]);
302
- let c = ed25519_Scalar::from_canonical_bytes(c_buf).ok()?;
303
- let s = ed25519_Scalar::from_canonical_bytes(s_buf).ok()?;
304
-
305
- Some(VRFProof { Gamma: gamma, c, s })
+ let c: Option<ed25519_Scalar> = ed25519_Scalar::from_canonical_bytes(c_buf).into();
+ let s: Option<ed25519_Scalar> = ed25519_Scalar::from_canonical_bytes(s_buf).into();
+
+ Some(VRFProof {
306
+ Gamma: gamma,
307
+ c: c?,
308
+ s: s?,
309
+ })
310
}
311
_ => None,
312
0 commit comments