allows private addresses by default in test-validator (backport #18976) (#18980)

* allows private addresses by default in test-validator (#18976)

(cherry picked from commit 1cef6fd4b4)

# Conflicts:
#	validator/src/bin/solana-test-validator.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
This commit is contained in:
mergify[bot]
2021-07-30 00:05:19 +00:00
committed by GitHub
parent eacc69efba
commit 20ad3005b5

View File

@ -280,16 +280,10 @@ fn main() {
If the ledger already exists then this parameter is silently ignored", If the ledger already exists then this parameter is silently ignored",
), ),
) )
.arg(
Arg::with_name("allow_private_addr")
.long("allow-private-addr")
.takes_value(false)
.help("Allow contacting private ip addresses")
.hidden(true),
)
.get_matches(); .get_matches();
let socket_addr_space = SocketAddrSpace::new(matches.is_present("allow_private_addr")); // TODO: Ideally test-validator should *only* allow private addresses.
let socket_addr_space = SocketAddrSpace::new(/*allow_private_addr=*/ true);
let cli_config = if let Some(config_file) = matches.value_of("config_file") { let cli_config = if let Some(config_file) = matches.value_of("config_file") {
solana_cli_config::Config::load(config_file).unwrap_or_default() solana_cli_config::Config::load(config_file).unwrap_or_default()
} else { } else {