Add a --no-private-ipv4 CLI option (#4042)

* Add a --no-private-ipv4 CLI option

* Fix tests

* Fix tests
This commit is contained in:
Pierre Krieger
2019-11-10 11:14:36 +01:00
committed by Arkadiy Paronyan
parent 9defa6a281
commit 401e213aa2
8 changed files with 56 additions and 8 deletions
+6
View File
@@ -145,6 +145,12 @@ pub struct NetworkConfigurationParams {
#[structopt(long = "port", value_name = "PORT")]
pub port: Option<u16>,
/// Allow connecting to private IPv4 addresses (as specified in
/// [RFC1918](https://tools.ietf.org/html/rfc1918)), unless the address was passed with
/// `--reserved-nodes` or `--bootnodes`.
#[structopt(long = "no-private-ipv4")]
pub no_private_ipv4: bool,
/// Specify the number of outgoing connections we're trying to maintain.
#[structopt(long = "out-peers", value_name = "COUNT", default_value = "25")]
pub out_peers: u32,