From c4faccc77f5e7fe4c9629b303527db92565ca451 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 28 Jan 2020 11:14:25 -0700 Subject: [PATCH] getClusterNodes now excludes validators with a different shred version --- core/src/rpc.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/rpc.rs b/core/src/rpc.rs index d466a22590..f24a7138fd 100644 --- a/core/src/rpc.rs +++ b/core/src/rpc.rs @@ -728,11 +728,14 @@ impl RpcSol for RpcSolImpl { None } } + let shred_version = cluster_info.my_data().shred_version; Ok(cluster_info .all_peers() .iter() .filter_map(|(contact_info, _)| { - if ContactInfo::is_valid_address(&contact_info.gossip) { + if shred_version == contact_info.shred_version + && ContactInfo::is_valid_address(&contact_info.gossip) + { Some(RpcContactInfo { pubkey: contact_info.id.to_string(), gossip: Some(contact_info.gossip),