X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Fchanmon_consistency.rs;fp=fuzz%2Fsrc%2Fchanmon_consistency.rs;h=372bed6049370c065c0d7a660f61a466ec715bd4;hb=11166aa83623c7e80015d50dbfc9fc8529f969a2;hp=9b3f1cd365b12ee148e1a5638254614f79a1a3d3;hpb=7e05623befc111422d1d4230f4e51629566a2ae6;p=rust-lightning diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs index 9b3f1cd3..372bed60 100644 --- a/fuzz/src/chanmon_consistency.rs +++ b/fuzz/src/chanmon_consistency.rs @@ -168,10 +168,10 @@ impl KeysInterface for KeyProvider { Ok(SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, self.node_id]).unwrap()) } - fn ecdh(&self, recipient: Recipient, other_key: &PublicKey, tweak: Option<&[u8; 32]>) -> Result { + fn ecdh(&self, recipient: Recipient, other_key: &PublicKey, tweak: Option<&Scalar>) -> Result { let mut node_secret = self.get_node_secret(recipient)?; if let Some(tweak) = tweak { - node_secret = node_secret.mul_tweak(&Scalar::from_be_bytes(*tweak).unwrap()).unwrap(); + node_secret = node_secret.mul_tweak(tweak).unwrap(); } Ok(SharedSecret::new(other_key, &node_secret)) }