@@ -223,7 +223,7 @@ fn pass_async_payments_oms(
223223
224224 always_online_recipient_counterparty
225225 . node
226- . send_response_static_invoice_request (
226+ . respond_to_static_invoice_request (
227227 static_invoice,
228228 reply_path,
229229 invoice_request,
@@ -604,7 +604,7 @@ fn ignore_unexpected_static_invoice() {
604604 // Check that the sender will ignore the unexpected static invoice.
605605 nodes[ 1 ]
606606 . node
607- . send_response_static_invoice_request (
607+ . respond_to_static_invoice_request (
608608 unexpected_static_invoice,
609609 reply_path. clone ( ) ,
610610 invoice_request. clone ( ) ,
@@ -626,7 +626,7 @@ fn ignore_unexpected_static_invoice() {
626626 // held_htlc_available onion message.
627627 nodes[ 1 ]
628628 . node
629- . send_response_static_invoice_request (
629+ . respond_to_static_invoice_request (
630630 valid_static_invoice. clone ( ) ,
631631 reply_path. clone ( ) ,
632632 invoice_request. clone ( ) ,
@@ -649,7 +649,7 @@ fn ignore_unexpected_static_invoice() {
649649 // Receiving a duplicate invoice will have no effect.
650650 nodes[ 1 ]
651651 . node
652- . send_response_static_invoice_request (
652+ . respond_to_static_invoice_request (
653653 valid_static_invoice,
654654 reply_path,
655655 invoice_request,
@@ -738,15 +738,15 @@ fn ignore_duplicate_invoice() {
738738
739739 always_online_node
740740 . node
741- . send_response_static_invoice_request (
741+ . respond_to_static_invoice_request (
742742 static_invoice. clone ( ) ,
743743 reply_path,
744744 invoice_request,
745745 invoice_flow_res. invoice_request_path . clone ( ) ,
746746 )
747747 . unwrap ( ) ;
748748
749- // After calling `send_response_static_invoice_request ` the next two messages should be the
749+ // After calling `respond_to_static_invoice_request ` the next two messages should be the
750750 // invoice request to the intended for the async recipient and the static invoice to the
751751 // payer.
752752 let invreq_om =
@@ -835,7 +835,7 @@ fn ignore_duplicate_invoice() {
835835
836836 always_online_node
837837 . node
838- . send_response_static_invoice_request (
838+ . respond_to_static_invoice_request (
839839 static_invoice. clone ( ) ,
840840 reply_path,
841841 invoice_request,
@@ -857,15 +857,12 @@ fn ignore_duplicate_invoice() {
857857 let invoice_om =
858858 async_recipient. onion_messenger . next_onion_message_for_peer ( sender_node_id) . unwrap ( ) ;
859859
860- let ( invoice, context ) = match sender. onion_messenger . peel_onion_message ( & invoice_om) {
861- Ok ( PeeledOnion :: Offers ( OffersMessage :: Invoice ( invoice) , context , _) ) => ( invoice, context ) ,
860+ let invoice = match sender. onion_messenger . peel_onion_message ( & invoice_om) {
861+ Ok ( PeeledOnion :: Offers ( OffersMessage :: Invoice ( invoice) , _ , _) ) => invoice,
862862 _ => panic ! ( ) ,
863863 } ;
864864
865- assert ! ( matches!(
866- sender. node. send_payment_for_bolt12_invoice( & invoice, context. as_ref( ) ) ,
867- Ok ( ( ) )
868- ) ) ;
865+ sender. onion_messenger . handle_onion_message ( async_recipient_id, & invoice_om) ;
869866
870867 let mut events = sender. node . get_and_clear_pending_msg_events ( ) ;
871868 assert_eq ! ( events. len( ) , 1 ) ;
@@ -1008,7 +1005,7 @@ fn expired_static_invoice_fail() {
10081005
10091006 nodes[ 1 ]
10101007 . node
1011- . send_response_static_invoice_request (
1008+ . respond_to_static_invoice_request (
10121009 static_invoice. clone ( ) ,
10131010 reply_path,
10141011 invoice_request,
@@ -1093,7 +1090,7 @@ fn timeout_unreleased_payment() {
10931090
10941091 server
10951092 . node
1096- . send_response_static_invoice_request (
1093+ . respond_to_static_invoice_request (
10971094 static_invoice. clone ( ) ,
10981095 reply_path,
10991096 invoice_request,
@@ -2617,7 +2614,7 @@ fn invoice_request_forwarded_to_async_recipient() {
26172614
26182615 always_online_node
26192616 . node
2620- . send_response_static_invoice_request (
2617+ . respond_to_static_invoice_request (
26212618 static_invoice,
26222619 reply_path,
26232620 invoice_request,
0 commit comments