Add DNS resolution to cli tools

This commit is contained in:
Michael Vines
2019-04-13 19:34:27 -07:00
committed by Grimes
parent 6859907df9
commit 0767c0c07f
13 changed files with 100 additions and 57 deletions

View File

@ -12,6 +12,7 @@ homepage = "https://solana.com/"
clap = "2.33.0"
env_logger = "0.6.1"
solana = { path = "../core", version = "0.13.0" }
solana-netutil = { path = "../netutil", version = "0.13.0" }
solana-sdk = { path = "../sdk", version = "0.13.0" }
[features]

View File

@ -67,8 +67,8 @@ fn main() -> Result<(), Box<dyn error::Error>> {
.get_matches();
if let Some(addr) = matches.value_of("network") {
network_addr = addr.parse().unwrap_or_else(|e| {
eprintln!("failed to parse network: {}", e);
network_addr = solana_netutil::parse_host_port(addr).unwrap_or_else(|e| {
eprintln!("failed to parse network address: {}", e);
exit(1)
});
}