@@ -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" ) ;
@@ -1316,11 +1316,11 @@ impl OutboundPayments {
1316
1316
return
1317
1317
} ,
1318
1318
PendingOutboundPayment :: StaticInvoiceReceived { .. } => {
1319
- let ( payment_hash, keysend_preimage, retry_strategy) =
1319
+ let ( payment_hash, keysend_preimage, retry_strategy, invoice_request ) =
1320
1320
if let PendingOutboundPayment :: StaticInvoiceReceived {
1321
- payment_hash, keysend_preimage, retry_strategy, ..
1321
+ payment_hash, keysend_preimage, retry_strategy, invoice_request , ..
1322
1322
} = payment. remove ( ) {
1323
- ( payment_hash, keysend_preimage, retry_strategy)
1323
+ ( payment_hash, keysend_preimage, retry_strategy, invoice_request )
1324
1324
} else { debug_assert ! ( false ) ; return } ;
1325
1325
let keysend_preimage = Some ( keysend_preimage) ;
1326
1326
let total_amount = route_params. final_value_msat ;
@@ -1332,7 +1332,8 @@ impl OutboundPayments {
1332
1332
payment_params, entropy_source, best_block_height
1333
1333
) ;
1334
1334
outbounds. insert ( payment_id, retryable_payment) ;
1335
- ( total_amount, recipient_onion, keysend_preimage, onion_session_privs)
1335
+ ( total_amount, recipient_onion, keysend_preimage, Some ( invoice_request) ,
1336
+ onion_session_privs)
1336
1337
} ,
1337
1338
PendingOutboundPayment :: Fulfilled { .. } => {
1338
1339
log_error ! ( logger, "Payment already completed" ) ;
@@ -1351,8 +1352,8 @@ impl OutboundPayments {
1351
1352
}
1352
1353
} ;
1353
1354
let res = self . pay_route_internal ( & route, payment_hash, & recipient_onion, keysend_preimage,
1354
- None , payment_id, Some ( total_msat) , onion_session_privs, node_signer, best_block_height ,
1355
- & send_payment_along_path) ;
1355
+ invoice_request . as_ref ( ) , payment_id, Some ( total_msat) , onion_session_privs, node_signer,
1356
+ best_block_height , & send_payment_along_path) ;
1356
1357
log_info ! ( logger, "Result retrying payment id {}: {:?}" , & payment_id, res) ;
1357
1358
if let Err ( e) = res {
1358
1359
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