From 28d149013af4cf848f3137f9492e193f31b8331e Mon Sep 17 00:00:00 2001 From: elnosh Date: Sat, 13 Dec 2025 14:18:52 -0500 Subject: [PATCH] Make expiry_secs optional for bolt11-receive --- ldk-server-cli/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ldk-server-cli/src/main.rs b/ldk-server-cli/src/main.rs index f9efe39..6f5ab3b 100644 --- a/ldk-server-cli/src/main.rs +++ b/ldk-server-cli/src/main.rs @@ -23,6 +23,7 @@ use std::fmt::Debug; const DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA: u32 = 1008; const DEFAULT_MAX_PATH_COUNT: u32 = 10; const DEFAULT_MAX_CHANNEL_SATURATION_POWER_OF_HALF: u32 = 2; +const DEFAULT_EXPIRY_SECS: u32 = 86_400; #[derive(Parser, Debug)] #[command(version, about, long_about = None)] @@ -55,7 +56,7 @@ enum Commands { #[arg(long)] description_hash: Option, #[arg(short, long)] - expiry_secs: u32, + expiry_secs: Option, #[arg(long)] amount_msat: Option, }, @@ -236,6 +237,7 @@ async fn main() { (None, None) => None, }; + let expiry_secs = expiry_secs.unwrap_or(DEFAULT_EXPIRY_SECS); let request = Bolt11ReceiveRequest { description: invoice_description, expiry_secs, amount_msat };