Repository: paritytech/substrate
File: client/cli/src/params/network_params.rs (Rust)

Code before:
	/// traffic and risk increased latency.
	#[arg(long, value_name = "COUNT", default_value_t = 5)]
	pub max_parallel_downloads: u32,

	#[allow(missing_docs)]
	#[clap(flatten)]
	pub node_key_params: NodeKeyParams,

	/// Enable peer discovery on local networks.
	/// By default this option is `true` for `--dev` or when the chain type is
	/// `Local`/`Development` and false otherwise.
	#[arg(long)]
	pub discover_local: bool,

	/// Require iterative Kademlia DHT queries to use disjoint paths for increased resiliency in
	/// the presence of potentially adversarial nodes.
	/// See the S/Kademlia paper for more information on the high level design as well as its
	/// security improvements.
	#[arg(long)]
	pub kademlia_disjoint_query_paths: bool,

	/// Kademlia replication factor determines to how many closest peers a record is replicated to.
	/// Default value is 20. Discovery mechanism requires successful replication to all
	/// `kademlia_replication_factor` peers to consider record successfully put.
	#[arg(long)]
	pub kademlia_replication_factor: Option<NonZeroUsize>,

	/// Join the IPFS network and serve transactions over bitswap protocol.
	#[arg(long)]
	pub ipfs_server: bool,

	/// Blockchain syncing mode.
	#[arg(
		long,
		value_enum,
		value_name = "SYNC_MODE",
		default_value_t = SyncMode::Full,
		ignore_case = true,
		verbatim_doc_comment
	)]
	pub sync: SyncMode,

	/// Maximum number of blocks per request.
	///
	/// Try reducing this number from the default value if you have a slow network connection
	/// and observe block requests timing out.
	#[arg(long, value_name = "COUNT", default_value_t = 64)]
	pub max_blocks_per_request: u32,
}

impl NetworkParams {

Review comment (suggestion):
```suggestion
	/// Kademlia replication factor determines to how many closest peers a record is replicated to.
	///
	/// Discovery mechanism requires successful replication to all
	/// `kademlia_replication_factor` peers to consider record successfully put.
	#[arg(long, default_value = "20")]
	pub kademlia_replication_factor: NonZeroUsize,
```

Code after:
	/// traffic and risk increased latency.
	#[arg(long, value_name = "COUNT", default_value_t = 5)]
	pub max_parallel_downloads: u32,

	#[allow(missing_docs)]
	#[clap(flatten)]
	pub node_key_params: NodeKeyParams,

	/// Enable peer discovery on local networks.
	/// By default this option is `true` for `--dev` or when the chain type is
	/// `Local`/`Development` and false otherwise.
	#[arg(long)]
	pub discover_local: bool,

	/// Require iterative Kademlia DHT queries to use disjoint paths for increased resiliency in
	/// the presence of potentially adversarial nodes.
	/// See the S/Kademlia paper for more information on the high level design as well as its
	/// security improvements.
	#[arg(long)]
	pub kademlia_disjoint_query_paths: bool,

	/// Kademlia replication factor determines to how many closest peers a record is replicated to.
	///
	/// Discovery mechanism requires successful replication to all
	/// `kademlia_replication_factor` peers to consider record successfully put.
	#[arg(long, default_value = "20")]
	pub kademlia_replication_factor: NonZeroUsize,

	/// Join the IPFS network and serve transactions over bitswap protocol.
	#[arg(long)]
	pub ipfs_server: bool,

	/// Blockchain syncing mode.
	#[arg(
		long,
		value_enum,
		value_name = "SYNC_MODE",
		default_value_t = SyncMode::Full,
		ignore_case = true,
		verbatim_doc_comment
	)]
	pub sync: SyncMode,

	/// Maximum number of blocks per request.
	///
	/// Try reducing this number from the default value if you have a slow network connection
	/// and observe block requests timing out.
	#[arg(long, value_name = "COUNT", default_value_t = 64)]
	pub max_blocks_per_request: u32,
}