From 27cab8631a8675c4a5f7741f37bc3067cd60c244 Mon Sep 17 00:00:00 2001 From: petarjuki7 Date: Wed, 22 Oct 2025 14:23:48 +0200 Subject: [PATCH] feat(cli): add target peers config --- anchor/client/src/cli.rs | 7 +++++++ anchor/client/src/config.rs | 3 +++ 2 files changed, 10 insertions(+) diff --git a/anchor/client/src/cli.rs b/anchor/client/src/cli.rs index fec7a719c..a8111f980 100644 --- a/anchor/client/src/cli.rs +++ b/anchor/client/src/cli.rs @@ -281,6 +281,13 @@ pub struct Node { )] pub use_zero_ports: bool, + #[clap( + long, + help = "Specify the target number of connected peers", + action = ArgAction::Set, + )] + pub target_peers: Option, + // Prometheus metrics HTTP server related arguments #[clap( long, diff --git a/anchor/client/src/config.rs b/anchor/client/src/config.rs index a909f389f..89f5428d7 100644 --- a/anchor/client/src/config.rs +++ b/anchor/client/src/config.rs @@ -182,6 +182,9 @@ pub fn from_cli(cli_args: &Node, global_config: GlobalConfig) -> Result