propagates the new contact-info through gossip (#34092)

Working towards migrating from legacy contact-info to the new
contact-info:
https://github.com/solana-labs/solana/pull/29596
This commit is contained in:
behzad nouri 2023-11-15 19:02:21 +00:00 committed by GitHub
parent 67dab71e82
commit ba0a49b436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 12 deletions

View File

@ -18,7 +18,7 @@ use {
crds::{Crds, GossipRoute, VersionedCrdsValue},
crds_gossip,
crds_gossip_error::CrdsGossipError,
crds_value::{CrdsData, CrdsValue},
crds_value::CrdsValue,
legacy_contact_info::LegacyContactInfo as ContactInfo,
ping_pong::PingCache,
},
@ -488,11 +488,6 @@ impl CrdsGossipPull {
let out: Vec<_> = crds
.filter_bitmask(filter.mask, filter.mask_bits)
.filter(pred)
.filter(|entry| {
// Exclude the new ContactInfo from the pull responses
// until the cluster has upgraded.
!matches!(&entry.value.data, CrdsData::ContactInfo(_))
})
.map(|entry| entry.value.clone())
.take(output_size_limit.load(Ordering::Relaxed).max(0) as usize)
.collect();

View File

@ -16,7 +16,7 @@ use {
cluster_info::{Ping, CRDS_UNIQUE_PUBKEY_CAPACITY},
crds::{Crds, CrdsError, Cursor, GossipRoute},
crds_gossip,
crds_value::{CrdsData, CrdsValue},
crds_value::CrdsValue,
ping_pong::PingCache,
push_active_set::PushActiveSet,
received_cache::ReceivedCache,
@ -191,11 +191,6 @@ impl CrdsGossipPush {
let crds = crds.read().unwrap();
let entries = crds
.get_entries(crds_cursor.deref_mut())
.filter(|entry| {
// Exclude the new ContactInfo from outgoing push messages
// until the cluster has upgraded.
!matches!(&entry.value.data, CrdsData::ContactInfo(_))
})
.map(|entry| &entry.value)
.filter(|value| wallclock_window.contains(&value.wallclock()));
for value in entries {