From: Valentine Wallace Date: Tue, 7 Mar 2023 22:13:57 +0000 (-0500) Subject: Ensure payment_params present when checking is_retryable_now X-Git-Tag: v0.0.115~65^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=f89b7d6fa9c4ce4e6a9fb14e5a39e088a3e73095;p=rust-lightning Ensure payment_params present when checking is_retryable_now --- diff --git a/lightning/src/ln/outbound_payment.rs b/lightning/src/ln/outbound_payment.rs index 291a17fda..6ede956b7 100644 --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@ -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);