Always send pull responses to the origin addr (#4894)

This commit is contained in:
Sagar Dhawan
2019-07-01 16:49:05 -07:00
committed by GitHub
parent 0c8f187993
commit 65adce65fa
2 changed files with 6 additions and 19 deletions

View File

@@ -41,12 +41,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
SubCommand::with_name("spy")
.about("Monitor the gossip entrypoint")
.setting(AppSettings::DisableVersion)
.arg(
clap::Arg::with_name("pull_only")
.long("pull-only")
.takes_value(false)
.help("Use a partial gossip node (Pulls only) to spy on the cluster. By default it will use a full fledged gossip node (Pushes and Pulls). Useful when behind a NAT"),
)
.arg(
Arg::with_name("num_nodes")
.short("N")
@@ -120,9 +114,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
.value_of("node_pubkey")
.map(|pubkey_str| pubkey_str.parse::<Pubkey>().unwrap());
let gossip_addr = if matches.is_present("pull_only") {
None
} else {
let gossip_addr = {
let mut addr = socketaddr_any!();
addr.set_ip(
solana_netutil::get_public_ip_addr(&entrypoint_addr).unwrap_or_else(|err| {