1- use bitcoin:: secp256k1:: PublicKey ;
2- use std:: collections:: HashMap ;
3- use std:: path:: PathBuf ;
4- use std:: sync:: Arc ;
5- use tokio:: sync:: Mutex ;
6-
71use anyhow:: anyhow;
2+ use bitcoin:: secp256k1:: PublicKey ;
83use clap:: builder:: TypedValueParser ;
94use clap:: Parser ;
105use log:: LevelFilter ;
@@ -13,6 +8,10 @@ use simln_lib::{
138 NodeId , SimParams , Simulation , SimulationCfg , WriteResults ,
149} ;
1510use simple_logger:: SimpleLogger ;
11+ use std:: collections:: HashMap ;
12+ use std:: path:: PathBuf ;
13+ use std:: sync:: Arc ;
14+ use tokio:: sync:: Mutex ;
1615
1716/// The default directory where the simulation files are stored and where the results will be written to.
1817pub const DEFAULT_DATA_DIR : & str = "." ;
@@ -21,10 +20,10 @@ pub const DEFAULT_DATA_DIR: &str = ".";
2120pub const DEFAULT_SIM_FILE : & str = "sim.json" ;
2221
2322/// The default expected payment amount for the simulation, around ~$10 at the time of writing.
24- pub const EXPECTED_PAYMENT_AMOUNT : u64 = 3_800_000 ;
23+ pub const DEFAULT_EXPECTED_PAYMENT_AMOUNT : u64 = 3_800_000 ;
2524
2625/// The number of times over each node in the network sends its total deployed capacity in a calendar month.
27- pub const ACTIVITY_MULTIPLIER : f64 = 2.0 ;
26+ pub const DEFAULT_ACTIVITY_MULTIPLIER : f64 = 2.0 ;
2827
2928/// Default batch size to flush result data to disk
3029const DEFAULT_PRINT_BATCH_SIZE : u32 = 500 ;
@@ -66,10 +65,10 @@ struct Cli {
6665 #[ clap( long, short, verbatim_doc_comment, default_value = "info" ) ]
6766 log_level : LevelFilter ,
6867 /// Expected payment amount for the random activity generator
69- #[ clap( long, short, default_value_t = EXPECTED_PAYMENT_AMOUNT , value_parser = clap:: builder:: RangedU64ValueParser :: <u64 >:: new( ) . range( 1 ..u64 :: MAX ) ) ]
68+ #[ clap( long, short, default_value_t = DEFAULT_EXPECTED_PAYMENT_AMOUNT , value_parser = clap:: builder:: RangedU64ValueParser :: <u64 >:: new( ) . range( 1 ..u64 :: MAX ) ) ]
7069 expected_pmt_amt : u64 ,
7170 /// Multiplier of the overall network capacity used by the random activity generator
72- #[ clap( long, short, default_value_t = ACTIVITY_MULTIPLIER , value_parser = clap:: builder:: StringValueParser :: new( ) . try_map( deserialize_f64_greater_than_zero) ) ]
71+ #[ clap( long, short, default_value_t = DEFAULT_ACTIVITY_MULTIPLIER , value_parser = clap:: builder:: StringValueParser :: new( ) . try_map( deserialize_f64_greater_than_zero) ) ]
7372 capacity_multiplier : f64 ,
7473 /// Do not create an output file containing the simulations results
7574 #[ clap( long, default_value_t = false ) ]
0 commit comments