From: Valentine Wallace Date: Mon, 3 Apr 2023 16:03:42 +0000 (-0400) Subject: outbound_payment: remove unused cltv delta var X-Git-Tag: v0.0.115~5^2~12 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=2a23b80c357b29dae04699f9934aeac480fd8b12;p=rust-lightning outbound_payment: remove unused cltv delta var --- diff --git a/lightning/src/ln/outbound_payment.rs b/lightning/src/ln/outbound_payment.rs index 33f4762bb..4758b7ea4 100644 --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@ -26,7 +26,6 @@ use crate::util::time::Time; use crate::util::time::tests::SinceEpoch; use crate::util::ser::ReadableArgs; -use core::cmp; use core::fmt::{self, Display, Formatter}; use core::ops::Deref; @@ -1048,7 +1047,6 @@ impl OutboundPayments { let mut has_ok = false; let mut has_err = false; let mut pending_amt_unsent = 0; - let mut max_unsent_cltv_delta = 0; for (res, path) in results.iter().zip(route.paths.iter()) { if res.is_ok() { has_ok = true; } if res.is_err() { has_err = true; } @@ -1059,7 +1057,6 @@ impl OutboundPayments { has_ok = true; } else if res.is_err() { pending_amt_unsent += path.last().unwrap().fee_msat; - max_unsent_cltv_delta = cmp::max(max_unsent_cltv_delta, path.last().unwrap().cltv_expiry_delta); } } if has_err && has_ok {