@@ -1257,7 +1257,7 @@ impl OutboundPayments {
1257
1257
}
1258
1258
}
1259
1259
}
1260
- let ( total_msat, recipient_onion, keysend_preimage, onion_session_privs) = {
1260
+ let ( total_msat, recipient_onion, keysend_preimage, invoice_request , onion_session_privs) = {
1261
1261
let mut outbounds = self . pending_outbound_payments . lock ( ) . unwrap ( ) ;
1262
1262
match outbounds. entry ( payment_id) {
1263
1263
hash_map:: Entry :: Occupied ( mut payment) => {
@@ -1299,7 +1299,7 @@ impl OutboundPayments {
1299
1299
1300
1300
payment. get_mut ( ) . increment_attempts ( ) ;
1301
1301
1302
- ( total_msat, recipient_onion, keysend_preimage, onion_session_privs)
1302
+ ( total_msat, recipient_onion, keysend_preimage, None , onion_session_privs)
1303
1303
} ,
1304
1304
PendingOutboundPayment :: Legacy { .. } => {
1305
1305
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 {
1317
1317
} ,
1318
1318
PendingOutboundPayment :: StaticInvoiceReceived { .. } => {
1319
1319
let PendingOutboundPayment :: StaticInvoiceReceived {
1320
- payment_hash, keysend_preimage, retry_strategy, ..
1320
+ payment_hash, keysend_preimage, retry_strategy, invoice_request , ..
1321
1321
} = payment. remove ( ) else { debug_assert ! ( false ) ; return } ;
1322
1322
let total_amount = route_params. final_value_msat ;
1323
1323
let recipient_onion = RecipientOnionFields :: spontaneous_empty ( ) ;
@@ -1328,7 +1328,8 @@ impl OutboundPayments {
1328
1328
retry_strategy, payment_params, entropy_source, best_block_height
1329
1329
) ;
1330
1330
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)
1332
1333
} ,
1333
1334
PendingOutboundPayment :: Fulfilled { .. } => {
1334
1335
log_error ! ( logger, "Payment already completed" ) ;
@@ -1347,8 +1348,8 @@ impl OutboundPayments {
1347
1348
}
1348
1349
} ;
1349
1350
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) ;
1352
1353
log_info ! ( logger, "Result retrying payment id {}: {:?}" , & payment_id, res) ;
1353
1354
if let Err ( e) = res {
1354
1355
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