Skip to content

Commit 4451d45

Browse files
committed
Make expiry_secs optional for bolt11-receive
1 parent dc62253 commit 4451d45

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ldk-server-cli/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use std::fmt::Debug;
2323
const DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA: u32 = 1008;
2424
const DEFAULT_MAX_PATH_COUNT: u32 = 10;
2525
const DEFAULT_MAX_CHANNEL_SATURATION_POWER_OF_HALF: u32 = 2;
26+
const DEFAULT_EXPIRY_SECS: u32 = 3600;
2627

2728
#[derive(Parser, Debug)]
2829
#[command(version, about, long_about = None)]
@@ -55,7 +56,7 @@ enum Commands {
5556
#[arg(long)]
5657
description_hash: Option<String>,
5758
#[arg(short, long)]
58-
expiry_secs: u32,
59+
expiry_secs: Option<u32>,
5960
#[arg(long)]
6061
amount_msat: Option<u64>,
6162
},
@@ -236,6 +237,7 @@ async fn main() {
236237
(None, None) => None,
237238
};
238239

240+
let expiry_secs = expiry_secs.unwrap_or(DEFAULT_EXPIRY_SECS);
239241
let request =
240242
Bolt11ReceiveRequest { description: invoice_description, expiry_secs, amount_msat };
241243

0 commit comments

Comments
 (0)