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
-
7
1
use anyhow:: anyhow;
2
+ use bitcoin:: secp256k1:: PublicKey ;
8
3
use clap:: builder:: TypedValueParser ;
9
4
use clap:: Parser ;
10
5
use log:: LevelFilter ;
@@ -13,6 +8,10 @@ use simln_lib::{
13
8
NodeId , SimParams , Simulation , SimulationCfg , WriteResults ,
14
9
} ;
15
10
use simple_logger:: SimpleLogger ;
11
+ use std:: collections:: HashMap ;
12
+ use std:: path:: PathBuf ;
13
+ use std:: sync:: Arc ;
14
+ use tokio:: sync:: Mutex ;
16
15
17
16
/// The default directory where the simulation files are stored and where the results will be written to.
18
17
pub const DEFAULT_DATA_DIR : & str = "." ;
@@ -21,10 +20,10 @@ pub const DEFAULT_DATA_DIR: &str = ".";
21
20
pub const DEFAULT_SIM_FILE : & str = "sim.json" ;
22
21
23
22
/// 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 ;
25
24
26
25
/// 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 ;
28
27
29
28
/// Default batch size to flush result data to disk
30
29
const DEFAULT_PRINT_BATCH_SIZE : u32 = 500 ;
@@ -66,10 +65,10 @@ struct Cli {
66
65
#[ clap( long, short, verbatim_doc_comment, default_value = "info" ) ]
67
66
log_level : LevelFilter ,
68
67
/// 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 ) ) ]
70
69
expected_pmt_amt : u64 ,
71
70
/// 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) ) ]
73
72
capacity_multiplier : f64 ,
74
73
/// Do not create an output file containing the simulations results
75
74
#[ clap( long, default_value_t = false ) ]
0 commit comments