@@ -1231,7 +1231,7 @@ impl OutboundPayments {
1231
1231
}
1232
1232
}
1233
1233
}
1234
- let ( total_msat, recipient_onion, keysend_preimage, onion_session_privs) = {
1234
+ let ( total_msat, recipient_onion, keysend_preimage, invoice_request , onion_session_privs) = {
1235
1235
let mut outbounds = self . pending_outbound_payments . lock ( ) . unwrap ( ) ;
1236
1236
match outbounds. entry ( payment_id) {
1237
1237
hash_map:: Entry :: Occupied ( mut payment) => {
@@ -1273,7 +1273,7 @@ impl OutboundPayments {
1273
1273
1274
1274
payment. get_mut ( ) . increment_attempts ( ) ;
1275
1275
1276
- ( total_msat, recipient_onion, keysend_preimage, onion_session_privs)
1276
+ ( total_msat, recipient_onion, keysend_preimage, None , onion_session_privs)
1277
1277
} ,
1278
1278
PendingOutboundPayment :: Legacy { .. } => {
1279
1279
log_error ! ( logger, "Unable to retry payments that were initially sent on LDK versions prior to 0.0.102" ) ;
@@ -1291,7 +1291,7 @@ impl OutboundPayments {
1291
1291
} ,
1292
1292
PendingOutboundPayment :: StaticInvoiceReceived { .. } => {
1293
1293
let PendingOutboundPayment :: StaticInvoiceReceived {
1294
- payment_hash, keysend_preimage, retry_strategy, ..
1294
+ payment_hash, keysend_preimage, retry_strategy, invoice_request , ..
1295
1295
} = payment. remove ( ) else { debug_assert ! ( false ) ; return } ;
1296
1296
let total_amount = route_params. final_value_msat ;
1297
1297
let recipient_onion = RecipientOnionFields :: spontaneous_empty ( ) ;
@@ -1301,7 +1301,8 @@ impl OutboundPayments {
1301
1301
Some ( retry_strategy) , payment_params, entropy_source, best_block_height
1302
1302
) ;
1303
1303
outbounds. insert ( payment_id, retryable_payment) ;
1304
- ( total_amount, recipient_onion, Some ( keysend_preimage) , onion_session_privs)
1304
+ ( total_amount, recipient_onion, Some ( keysend_preimage) , Some ( invoice_request) ,
1305
+ onion_session_privs)
1305
1306
} ,
1306
1307
PendingOutboundPayment :: Fulfilled { .. } => {
1307
1308
log_error ! ( logger, "Payment already completed" ) ;
@@ -1320,8 +1321,8 @@ impl OutboundPayments {
1320
1321
}
1321
1322
} ;
1322
1323
let res = self . pay_route_internal ( & route, payment_hash, & recipient_onion, keysend_preimage,
1323
- None , payment_id, Some ( total_msat) , onion_session_privs, node_signer, best_block_height ,
1324
- & send_payment_along_path) ;
1324
+ invoice_request . as_ref ( ) , payment_id, Some ( total_msat) , onion_session_privs, node_signer,
1325
+ best_block_height , & send_payment_along_path) ;
1325
1326
log_info ! ( logger, "Result retrying payment id {}: {:?}" , & payment_id, res) ;
1326
1327
if let Err ( e) = res {
1327
1328
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