File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ use std::fmt::Debug;
2323const DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA : u32 = 1008 ;
2424const DEFAULT_MAX_PATH_COUNT : u32 = 10 ;
2525const DEFAULT_MAX_CHANNEL_SATURATION_POWER_OF_HALF : u32 = 2 ;
26+ const DEFAULT_EXPIRY_SECS : u32 = 86_400 ;
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
You can’t perform that action at this time.
0 commit comments