From 62f9183d172ad151e6ab00d75a1bd63c8c401b71 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 1e73927ff9..3413d3a7f3 100644 --- a/core/src/rpc.rs +++ b/core/src/rpc.rs @@ -726,11 +726,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),