Rename solana-netutil to solana-net-utils for consistency (#6895)

* sed -i -e 's/netutil/net_utils/g' $(git grep --files-with-matches netutil :**.rs)

* sed -i -e 's/netutil/net-utils/g' $(git grep --files-with-matches netutil)

* git mv netutil/ net-utils

* Tweak a bit

* Fix rustfmt & clippy
This commit is contained in:
Ryo Onodera
2019-11-13 05:37:13 +09:00
committed by Michael Vines
parent bb00904fc8
commit 3faeb7fa79
33 changed files with 78 additions and 74 deletions

View File

@@ -14,6 +14,6 @@ solana-clap-utils = { path = "../clap-utils", version = "0.21.0" }
solana-core = { path = "../core", version = "0.21.0" }
solana-logger = { path = "../logger", version = "0.21.0" }
solana-metrics = { path = "../metrics", version = "0.21.0" }
solana-netutil = { path = "../netutil", version = "0.21.0" }
solana-net-utils = { path = "../net-utils", version = "0.21.0" }
solana-sdk = { path = "../sdk", version = "0.21.0" }

View File

@@ -34,7 +34,7 @@ fn main() {
.value_name("HOST:PORT")
.takes_value(true)
.required(true)
.validator(solana_netutil::is_host_port)
.validator(solana_net_utils::is_host_port)
.help("Rendezvous with the cluster at this entry point"),
)
.arg(
@@ -80,14 +80,15 @@ fn main() {
let entrypoint_addr = matches
.value_of("entrypoint")
.map(|entrypoint| {
solana_netutil::parse_host_port(entrypoint).expect("failed to parse entrypoint address")
solana_net_utils::parse_host_port(entrypoint)
.expect("failed to parse entrypoint address")
})
.unwrap();
let gossip_addr = {
let ip = solana_netutil::get_public_ip_addr(&entrypoint_addr).unwrap();
let ip = solana_net_utils::get_public_ip_addr(&entrypoint_addr).unwrap();
let mut addr = SocketAddr::new(ip, 0);
addr.set_ip(solana_netutil::get_public_ip_addr(&entrypoint_addr).unwrap());
addr.set_ip(solana_net_utils::get_public_ip_addr(&entrypoint_addr).unwrap());
addr
};
let node =