@@ -79,7 +79,9 @@ impl PendingOutboundPayment {
79
79
}
80
80
fn is_auto_retryable_now ( & self ) -> bool {
81
81
match self {
82
- PendingOutboundPayment :: Retryable { retry_strategy : Some ( strategy) , attempts, .. } => {
82
+ PendingOutboundPayment :: Retryable {
83
+ retry_strategy : Some ( strategy) , attempts, payment_params : Some ( _) , ..
84
+ } => {
83
85
strategy. is_retryable_now ( & attempts)
84
86
} ,
85
87
_ => false ,
@@ -516,11 +518,12 @@ impl OutboundPayments {
516
518
let mut retry_id_route_params = None ;
517
519
for ( pmt_id, pmt) in outbounds. iter_mut ( ) {
518
520
if pmt. is_auto_retryable_now ( ) {
519
- if let PendingOutboundPayment :: Retryable { pending_amt_msat, total_msat, payment_params : Some ( params) , .. } = pmt {
521
+ if let PendingOutboundPayment :: Retryable { pending_amt_msat, total_msat, payment_params, .. } = pmt {
522
+ let params = if let Some ( p) = payment_params { p. clone ( ) } else { debug_assert ! ( false ) ; continue } ;
520
523
if pending_amt_msat < total_msat {
521
524
retry_id_route_params = Some ( ( * pmt_id, RouteParameters {
522
525
final_value_msat : * total_msat - * pending_amt_msat,
523
- payment_params : params. clone ( ) ,
526
+ payment_params : params,
524
527
} ) ) ;
525
528
break
526
529
}
0 commit comments