@@ -11,7 +11,7 @@ use crate::blinded_path::message::{MessageContext, OffersContext};
1111use crate :: blinded_path:: payment:: PaymentContext ;
1212use crate :: blinded_path:: payment:: { AsyncBolt12OfferContext , BlindedPaymentTlvs } ;
1313use crate :: chain:: channelmonitor:: { HTLC_FAIL_BACK_BUFFER , LATENCY_GRACE_PERIOD_BLOCKS } ;
14- use crate :: events:: { Event , HTLCDestination , PaymentFailureReason } ;
14+ use crate :: events:: { Event , HTLCDestination , PaymentFailureReason , PaidInvoice } ;
1515use crate :: ln:: blinded_payment_tests:: { fail_blinded_htlc_backwards, get_blinded_route_parameters} ;
1616use crate :: ln:: channelmanager:: { PaymentId , RecipientOnionFields } ;
1717use crate :: ln:: functional_test_utils:: * ;
@@ -420,7 +420,7 @@ fn async_receive_flow_success() {
420420 . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 0 ) , params)
421421 . unwrap ( ) ;
422422 let release_held_htlc_om =
423- pass_async_payments_oms ( static_invoice, & nodes[ 0 ] , & nodes[ 1 ] , & nodes[ 2 ] ) . 1 ;
423+ pass_async_payments_oms ( static_invoice. clone ( ) , & nodes[ 0 ] , & nodes[ 1 ] , & nodes[ 2 ] ) . 1 ;
424424 nodes[ 0 ]
425425 . onion_messenger
426426 . handle_onion_message ( nodes[ 2 ] . node . get_our_node_id ( ) , & release_held_htlc_om) ;
@@ -441,7 +441,9 @@ fn async_receive_flow_success() {
441441 let args = PassAlongPathArgs :: new ( & nodes[ 0 ] , route[ 0 ] , amt_msat, payment_hash, ev)
442442 . with_payment_preimage ( keysend_preimage) ;
443443 do_pass_along_path ( args) ;
444- claim_payment_along_route ( ClaimAlongRouteArgs :: new ( & nodes[ 0 ] , route, keysend_preimage) ) ;
444+ let res = claim_payment_along_route ( ClaimAlongRouteArgs :: new ( & nodes[ 0 ] , route, keysend_preimage) ) ;
445+ assert ! ( res. is_some( ) ) ;
446+ assert_eq ! ( res, Some ( PaidInvoice :: StaticInvoice ( static_invoice) ) ) ;
445447}
446448
447449#[ cfg_attr( feature = "std" , ignore) ]
0 commit comments