Ensure payment_params present when checking is_retryable_now
authorValentine Wallace <vwallace@protonmail.com>
Tue, 7 Mar 2023 22:13:57 +0000 (17:13 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Mon, 13 Mar 2023 16:04:17 +0000 (12:04 -0400)
lightning/src/ln/outbound_payment.rs

index 291a17fdafa540539eb62925becb92de3678b31e..6ede956b7d52df3a035d0fd308d505bcf2650bc5 100644 (file)
@@ -79,7 +79,9 @@ impl PendingOutboundPayment {
        }
        fn is_auto_retryable_now(&self) -> bool {
                match self {
-                       PendingOutboundPayment::Retryable { retry_strategy: Some(strategy), attempts, .. } => {
+                       PendingOutboundPayment::Retryable {
+                               retry_strategy: Some(strategy), attempts, payment_params: Some(_), ..
+                       } => {
                                strategy.is_retryable_now(&attempts)
                        },
                        _ => false,
@@ -531,7 +533,7 @@ impl OutboundPayments {
                                                        }));
                                                        break
                                                }
-                                       }
+                                       } else { debug_assert!(false); }
                                }
                        }
                        core::mem::drop(outbounds);