From 775f8b9f8f0137660e7e13e46b24a97288828ef4 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 28 Aug 2024 08:01:41 +0200 Subject: [PATCH] f Move final cltv const to `spontaneous.rs` --- src/config.rs | 3 --- src/payment/spontaneous.rs | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config.rs b/src/config.rs index 17ec2e460..f0c2c856b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -32,9 +32,6 @@ pub(crate) const DEFAULT_ESPLORA_SERVER_URL: &str = "https://blockstream.info/ap // The default Esplora client timeout we're using. pub(crate) const DEFAULT_ESPLORA_CLIENT_TIMEOUT_SECS: u64 = 10; -// The default `final_cltv_expiry_delta` we apply when not set via the invoice. -pub(crate) const LDK_DEFAULT_FINAL_CLTV_EXPIRY_DELTA: u32 = 144; - // The timeout after which we abandon retrying failed payments. pub(crate) const LDK_PAYMENT_RETRY_TIMEOUT: Duration = Duration::from_secs(10); diff --git a/src/payment/spontaneous.rs b/src/payment/spontaneous.rs index bf5447c4b..b7b8dcc03 100644 --- a/src/payment/spontaneous.rs +++ b/src/payment/spontaneous.rs @@ -1,6 +1,6 @@ //! Holds a payment handler allowing to send spontaneous ("keysend") payments. -use crate::config::{Config, LDK_DEFAULT_FINAL_CLTV_EXPIRY_DELTA, LDK_PAYMENT_RETRY_TIMEOUT}; +use crate::config::{Config, LDK_PAYMENT_RETRY_TIMEOUT}; use crate::error::Error; use crate::logger::{log_error, log_info, FilesystemLogger, Logger}; use crate::payment::store::{ @@ -18,6 +18,9 @@ use bitcoin::secp256k1::PublicKey; use std::sync::{Arc, RwLock}; +// The default `final_cltv_expiry_delta` we apply when not set. +const LDK_DEFAULT_FINAL_CLTV_EXPIRY_DELTA: u32 = 144; + /// A payment handler allowing to send spontaneous ("keysend") payments. /// /// Should be retrieved by calling [`Node::spontaneous_payment`].