@@ -881,7 +881,7 @@ impl OutboundPayments {
881
881
route_params. max_total_routing_fee_msat = Some ( max_fee_msat) ;
882
882
}
883
883
self . send_payment_for_bolt12_invoice_internal (
884
- payment_id, payment_hash, None , route_params, retry_strategy, router, first_hops,
884
+ payment_id, payment_hash, None , None , route_params, retry_strategy, router, first_hops,
885
885
inflight_htlcs, entropy_source, node_signer, node_id_lookup, secp_ctx, best_block_height,
886
886
logger, pending_events, send_payment_along_path
887
887
)
@@ -891,10 +891,10 @@ impl OutboundPayments {
891
891
R : Deref , ES : Deref , NS : Deref , NL : Deref , IH , SP , L : Deref
892
892
> (
893
893
& self , payment_id : PaymentId , payment_hash : PaymentHash ,
894
- keysend_preimage : Option < PaymentPreimage > , mut route_params : RouteParameters ,
895
- retry_strategy : Retry , router : & R , first_hops : Vec < ChannelDetails > , inflight_htlcs : IH ,
896
- entropy_source : & ES , node_signer : & NS , node_id_lookup : & NL ,
897
- secp_ctx : & Secp256k1 < secp256k1:: All > , best_block_height : u32 , logger : & L ,
894
+ keysend_preimage : Option < PaymentPreimage > , invoice_request : Option < & InvoiceRequest > ,
895
+ mut route_params : RouteParameters , retry_strategy : Retry , router : & R ,
896
+ first_hops : Vec < ChannelDetails > , inflight_htlcs : IH , entropy_source : & ES , node_signer : & NS ,
897
+ node_id_lookup : & NL , secp_ctx : & Secp256k1 < secp256k1:: All > , best_block_height : u32 , logger : & L ,
898
898
pending_events : & Mutex < VecDeque < ( events:: Event , Option < EventCompletionAction > ) > > ,
899
899
send_payment_along_path : SP ,
900
900
) -> Result < ( ) , Bolt12PaymentError >
@@ -964,9 +964,9 @@ impl OutboundPayments {
964
964
}
965
965
966
966
let result = self . pay_route_internal (
967
- & route, payment_hash, & recipient_onion, keysend_preimage, None , payment_id,
968
- Some ( route_params. final_value_msat ) , onion_session_privs, node_signer,
969
- best_block_height , & send_payment_along_path
967
+ & route, payment_hash, & recipient_onion, keysend_preimage, invoice_request , payment_id,
968
+ Some ( route_params. final_value_msat ) , onion_session_privs, node_signer, best_block_height ,
969
+ & send_payment_along_path
970
970
) ;
971
971
log_info ! (
972
972
logger, "Sending payment with id {} and hash {} returned {:?}" , payment_id,
@@ -1082,23 +1082,24 @@ impl OutboundPayments {
1082
1082
IH : Fn ( ) -> InFlightHtlcs ,
1083
1083
SP : Fn ( SendAlongPathArgs ) -> Result < ( ) , APIError > ,
1084
1084
{
1085
- let ( payment_hash, keysend_preimage, route_params, retry_strategy) =
1085
+ let ( payment_hash, keysend_preimage, route_params, retry_strategy, invoice_request ) =
1086
1086
match self . pending_outbound_payments . lock ( ) . unwrap ( ) . entry ( payment_id) {
1087
1087
hash_map:: Entry :: Occupied ( entry) => match entry. get ( ) {
1088
1088
PendingOutboundPayment :: StaticInvoiceReceived {
1089
- payment_hash, route_params, retry_strategy, keysend_preimage, ..
1089
+ payment_hash, route_params, retry_strategy, keysend_preimage, invoice_request , ..
1090
1090
} => {
1091
- ( * payment_hash, * keysend_preimage, route_params. clone ( ) , * retry_strategy)
1091
+ ( * payment_hash, * keysend_preimage, route_params. clone ( ) , * retry_strategy,
1092
+ invoice_request. clone ( ) )
1092
1093
} ,
1093
1094
_ => return Err ( Bolt12PaymentError :: DuplicateInvoice ) ,
1094
1095
} ,
1095
1096
hash_map:: Entry :: Vacant ( _) => return Err ( Bolt12PaymentError :: UnexpectedInvoice ) ,
1096
1097
} ;
1097
1098
1098
1099
self . send_payment_for_bolt12_invoice_internal (
1099
- payment_id, payment_hash, Some ( keysend_preimage) , route_params , retry_strategy , router ,
1100
- first_hops , inflight_htlcs , entropy_source , node_signer , node_id_lookup , secp_ctx ,
1101
- best_block_height, logger, pending_events, send_payment_along_path
1100
+ payment_id, payment_hash, Some ( keysend_preimage) , Some ( & invoice_request ) , route_params ,
1101
+ retry_strategy , router , first_hops , inflight_htlcs , entropy_source , node_signer ,
1102
+ node_id_lookup , secp_ctx , best_block_height, logger, pending_events, send_payment_along_path
1102
1103
)
1103
1104
}
1104
1105
0 commit comments