diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index cc1699e..5f1b3d2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -102,6 +102,11 @@ struct Args { #[arg(long, value_name = "NAME", value_parser = parse_alias)] alias: Option<String>, + /// Members that renewed their alive stamp within this many days vote on remakes + /// (a majority of them must agree). Matters on the node that coordinates a remake. + #[arg(long, value_name = "DAYS", default_value_t = 7, value_parser = clap::value_parser!(u64).range(1..))] + electorate_window_days: u64, + /// Test hook: start on a non-genesis epoch of this generation (with a fixed dummy /// id), to check that nodes on different epochs refuse to sync. #[arg(long, hide = true, requires = "debug_api", value_name = "GENERATION")] @@ -222,6 +227,7 @@ async fn main() -> Result<()> { run_id: uuid::Uuid::new_v4().into_bytes(), neighbours_k: args.neighbours.max(2), alias: args.alias, + electorate_window: Duration::from_secs(args.electorate_window_days * 24 * 3600), neighbours: Default::default(), pulling: Default::default(), rtt: Default::default(), |
