@@ -1167,7 +1167,7 @@ impl OutboundPayments {
11671167 }
11681168 }
11691169 }
1170- let ( total_msat, recipient_onion, keysend_preimage, onion_session_privs) = {
1170+ let ( total_msat, recipient_onion, keysend_preimage, invoice_request , onion_session_privs) = {
11711171 let mut outbounds = self . pending_outbound_payments . lock ( ) . unwrap ( ) ;
11721172 match outbounds. entry ( payment_id) {
11731173 hash_map:: Entry :: Occupied ( mut payment) => {
@@ -1209,7 +1209,7 @@ impl OutboundPayments {
12091209
12101210 payment. get_mut ( ) . increment_attempts ( ) ;
12111211
1212- ( total_msat, recipient_onion, keysend_preimage, onion_session_privs)
1212+ ( total_msat, recipient_onion, keysend_preimage, None , onion_session_privs)
12131213 } ,
12141214 PendingOutboundPayment :: Legacy { .. } => {
12151215 log_error ! ( logger, "Unable to retry payments that were initially sent on LDK versions prior to 0.0.102" ) ;
@@ -1229,11 +1229,11 @@ impl OutboundPayments {
12291229 retry_strategy, payment_params, entropy_source, best_block_height
12301230 ) ;
12311231 * payment. into_mut ( ) = retryable_payment;
1232- ( total_amount, recipient_onion, None , onion_session_privs)
1232+ ( total_amount, recipient_onion, None , None , onion_session_privs)
12331233 } ,
12341234 PendingOutboundPayment :: StaticInvoiceReceived { .. } => {
12351235 let PendingOutboundPayment :: StaticInvoiceReceived {
1236- payment_hash, keysend_preimage, retry_strategy, ..
1236+ payment_hash, keysend_preimage, retry_strategy, invoice_request , ..
12371237 } = payment. remove ( ) else { debug_assert ! ( false ) ; return } ;
12381238 let total_amount = route_params. final_value_msat ;
12391239 let recipient_onion = RecipientOnionFields :: spontaneous_empty ( ) ;
@@ -1243,7 +1243,8 @@ impl OutboundPayments {
12431243 Some ( retry_strategy) , payment_params, entropy_source, best_block_height
12441244 ) ;
12451245 outbounds. insert ( payment_id, retryable_payment) ;
1246- ( total_amount, recipient_onion, Some ( keysend_preimage) , onion_session_privs)
1246+ ( total_amount, recipient_onion, Some ( keysend_preimage) , Some ( invoice_request) ,
1247+ onion_session_privs)
12471248 } ,
12481249 PendingOutboundPayment :: Fulfilled { .. } => {
12491250 log_error ! ( logger, "Payment already completed" ) ;
@@ -1262,8 +1263,8 @@ impl OutboundPayments {
12621263 }
12631264 } ;
12641265 let res = self . pay_route_internal ( & route, payment_hash, & recipient_onion, keysend_preimage,
1265- None , payment_id, Some ( total_msat) , onion_session_privs, node_signer, best_block_height ,
1266- & send_payment_along_path) ;
1266+ invoice_request . as_ref ( ) , payment_id, Some ( total_msat) , onion_session_privs, node_signer,
1267+ best_block_height , & send_payment_along_path) ;
12671268 log_info ! ( logger, "Result retrying payment id {}: {:?}" , & payment_id, res) ;
12681269 if let Err ( e) = res {
12691270 self . handle_pay_route_err ( e, payment_id, payment_hash, route, route_params, router, first_hops, inflight_htlcs, entropy_source, node_signer, best_block_height, logger, pending_events, send_payment_along_path) ;
0 commit comments