X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Frefund_deser.rs;h=81b614d602b269259a9ce67fadbc86307c583334;hb=71095d4c004015c7e3b6837d66a42bcc67ebc67e;hp=d76607c03b02a53c5745a9a10e1d78792598f370;hpb=c89fd38f2a6681b28f853d0f7d80795ca38d9ffd;p=rust-lightning diff --git a/fuzz/src/refund_deser.rs b/fuzz/src/refund_deser.rs index d76607c0..81b614d6 100644 --- a/fuzz/src/refund_deser.rs +++ b/fuzz/src/refund_deser.rs @@ -11,11 +11,11 @@ use bitcoin::secp256k1::{KeyPair, PublicKey, Secp256k1, SecretKey, self}; use crate::utils::test_logger; use core::convert::{Infallible, TryFrom}; use lightning::blinded_path::BlindedPath; -use lightning::chain::keysinterface::EntropySource; +use lightning::sign::EntropySource; use lightning::ln::PaymentHash; use lightning::ln::features::BlindedHopFeatures; -use lightning::offers::invoice::{BlindedPayInfo, UnsignedInvoice}; -use lightning::offers::parse::SemanticError; +use lightning::offers::invoice::{BlindedPayInfo, UnsignedBolt12Invoice}; +use lightning::offers::parse::Bolt12SemanticError; use lightning::offers::refund::Refund; use lightning::util::ser::Writeable; @@ -60,7 +60,7 @@ fn privkey(byte: u8) -> SecretKey { fn build_response<'a, T: secp256k1::Signing + secp256k1::Verification>( refund: &'a Refund, signing_pubkey: PublicKey, secp_ctx: &Secp256k1 -) -> Result, SemanticError> { +) -> Result, Bolt12SemanticError> { let entropy_source = Randomness {}; let paths = vec![ BlindedPath::new_for_message(&[pubkey(43), pubkey(44), pubkey(42)], &entropy_source, secp_ctx).unwrap(), @@ -86,7 +86,7 @@ fn build_response<'a, T: secp256k1::Signing + secp256k1::Verification>( }, ]; - let payment_paths = paths.into_iter().zip(payinfo.into_iter()).collect(); + let payment_paths = payinfo.into_iter().zip(paths.into_iter()).collect(); let payment_hash = PaymentHash([42; 32]); refund.respond_with(payment_paths, payment_hash, signing_pubkey)?.build() }