Skip to content

Commit

Permalink
fix eth sim cli
Browse files Browse the repository at this point in the history
  • Loading branch information
eserilev committed Apr 30, 2024
1 parent b8bea91 commit be90ac7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
16 changes: 8 additions & 8 deletions testing/simulator/src/basic_sim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ pub fn run_basic_sim(matches: &ArgMatches) -> Result<(), String> {
.unwrap_or(0);
println!("PROPOSER-NODES: {}", proposer_nodes);
let validators_per_node = matches
.get_one::<String>("validators_per_node")
.expect("missing validators_per_node default")
.get_one::<String>("validators-per-node")
.expect("missing validators-per-node default")
.parse::<usize>()
.expect("missing validators_per_node default");
.expect("missing validators-per-node default");
let speed_up_factor = matches
.get_one::<String>("speed_up_factor")
.expect("missing speed_up_factor default")
.get_one::<String>("speed-up-factor")
.expect("missing speed-up-factor default")
.parse::<u64>()
.expect("missing speed_up_factor default");
.expect("missing speed-up-factor default");
let log_level = matches
.get_one::<String>("debug-level")
.expect("missing speed_up_factor default");
.expect("missing debug-level");

let continue_after_checks = matches.get_flag("continue_after_checks");
let continue_after_checks = matches.get_flag("continue-after-checks");

println!("Basic Simulator:");
println!(" nodes: {}", node_count);
Expand Down
2 changes: 1 addition & 1 deletion testing/simulator/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub fn cli_app() -> Command {
Arg::new("continue-after-checks")
.short('c')
.long("continue_after_checks")
.action(ArgAction::Set)
.action(ArgAction::SetTrue)
.help("Continue after checks (default false)"),
),
)
Expand Down
22 changes: 13 additions & 9 deletions testing/simulator/src/fallback_sim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,32 @@ const SUGGESTED_FEE_RECIPIENT: [u8; 20] =
pub fn run_fallback_sim(matches: &ArgMatches) -> Result<(), String> {
let vc_count = matches
.get_one::<String>("vc-count")
.unwrap()
.expect("missing vc-count default")
.parse::<usize>()
.unwrap();
.expect("missing vc-count default");

let validators_per_vc = matches
.get_one::<String>("validators-per-vc")
.unwrap()
.expect("missing validators-per-vc default")
.parse::<usize>()
.unwrap();
.expect("missing validators-per-vc default");

let bns_per_vc = matches
.get_one::<String>("bns-per-vc")
.unwrap()
.expect("missing bns-per-vc default")
.parse::<usize>()
.unwrap();
.expect("missing bns-per-vc default");

assert!(bns_per_vc > 1);
let speed_up_factor = matches
.get_one::<String>("speed-up-factor")
.unwrap()
.expect("missing speed-up-factor default")
.parse::<u64>()
.unwrap();
let log_level = matches.get_one::<String>("debug-level").unwrap();
.expect("missing speed-up-factor default");

let log_level = matches
.get_one::<String>("debug-level")
.expect("missing debug-level default");

let continue_after_checks = matches.get_flag("continue-after-checks");

Expand Down

0 comments on commit be90ac7

Please sign in to comment.