Move pending forward htlc construction into method
[rust-lightning] / fuzz / src / refund_deser.rs
index fab303050901d0fb4b51fa7fee3e3423206f6d45..618b129f9a1e5517fa5dcddb09f739308feee436 100644 (file)
@@ -11,7 +11,7 @@ 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};
@@ -63,8 +63,8 @@ fn build_response<'a, T: secp256k1::Signing + secp256k1::Verification>(
 ) -> Result<UnsignedInvoice<'a>, SemanticError> {
        let entropy_source = Randomness {};
        let paths = vec![
-               BlindedPath::new(&[pubkey(43), pubkey(44), pubkey(42)], &entropy_source, secp_ctx).unwrap(),
-               BlindedPath::new(&[pubkey(45), pubkey(46), pubkey(42)], &entropy_source, secp_ctx).unwrap(),
+               BlindedPath::new_for_message(&[pubkey(43), pubkey(44), pubkey(42)], &entropy_source, secp_ctx).unwrap(),
+               BlindedPath::new_for_message(&[pubkey(45), pubkey(46), pubkey(42)], &entropy_source, secp_ctx).unwrap(),
        ];
 
        let payinfo = vec![
@@ -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()
 }