@@ -1257,7 +1257,7 @@ impl OutboundPayments {
12571257 }
12581258 }
12591259 }
1260- let ( total_msat, recipient_onion, keysend_preimage, onion_session_privs) = {
1260+ let ( total_msat, recipient_onion, keysend_preimage, invoice_request , onion_session_privs) = {
12611261 let mut outbounds = self . pending_outbound_payments . lock ( ) . unwrap ( ) ;
12621262 match outbounds. entry ( payment_id) {
12631263 hash_map:: Entry :: Occupied ( mut payment) => {
@@ -1299,7 +1299,7 @@ impl OutboundPayments {
12991299
13001300 payment. get_mut ( ) . increment_attempts ( ) ;
13011301
1302- ( total_msat, recipient_onion, keysend_preimage, onion_session_privs)
1302+ ( total_msat, recipient_onion, keysend_preimage, None , onion_session_privs)
13031303 } ,
13041304 PendingOutboundPayment :: Legacy { .. } => {
13051305 log_error ! ( logger, "Unable to retry payments that were initially sent on LDK versions prior to 0.0.102" ) ;
@@ -1317,7 +1317,7 @@ impl OutboundPayments {
13171317 } ,
13181318 PendingOutboundPayment :: StaticInvoiceReceived { .. } => {
13191319 let PendingOutboundPayment :: StaticInvoiceReceived {
1320- payment_hash, keysend_preimage, retry_strategy, ..
1320+ payment_hash, keysend_preimage, retry_strategy, invoice_request , ..
13211321 } = payment. remove ( ) else { debug_assert ! ( false ) ; return } ;
13221322 let total_amount = route_params. final_value_msat ;
13231323 let recipient_onion = RecipientOnionFields :: spontaneous_empty ( ) ;
@@ -1328,7 +1328,8 @@ impl OutboundPayments {
13281328 retry_strategy, payment_params, entropy_source, best_block_height
13291329 ) ;
13301330 outbounds. insert ( payment_id, retryable_payment) ;
1331- ( total_amount, recipient_onion, Some ( keysend_preimage) , onion_session_privs)
1331+ ( total_amount, recipient_onion, Some ( keysend_preimage) , Some ( invoice_request) ,
1332+ onion_session_privs)
13321333 } ,
13331334 PendingOutboundPayment :: Fulfilled { .. } => {
13341335 log_error ! ( logger, "Payment already completed" ) ;
@@ -1347,8 +1348,8 @@ impl OutboundPayments {
13471348 }
13481349 } ;
13491350 let res = self . pay_route_internal ( & route, payment_hash, & recipient_onion, keysend_preimage,
1350- None , payment_id, Some ( total_msat) , onion_session_privs, node_signer, best_block_height ,
1351- & send_payment_along_path) ;
1351+ invoice_request . as_ref ( ) , payment_id, Some ( total_msat) , onion_session_privs, node_signer,
1352+ best_block_height , & send_payment_along_path) ;
13521353 log_info ! ( logger, "Result retrying payment id {}: {:?}" , & payment_id, res) ;
13531354 if let Err ( e) = res {
13541355 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