diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 6082e67..a688e04 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,6 +91,11 @@ struct Args { #[arg(long, value_name = "SECONDS", default_value_t = 60)] keepalive_secs: u64, + /// Neighbours each node keeps (at least 2). Swarms of up to this many + 1 nodes are + /// a full mesh; larger ones sync over several hops. + #[arg(long, value_name = "COUNT", default_value_t = 12)] + neighbours: usize, + /// 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")] @@ -186,6 +191,8 @@ async fn main() -> Result<()> { remake: Arc::new(remake::RemakeState::default()), swarm_key, run_id: uuid::Uuid::new_v4().into_bytes(), + neighbours_k: args.neighbours.max(2), + neighbours: Default::default(), stale: Default::default(), catch_up_source: Default::default(), }; |
