feature gates merkle shreds on all clusters (#29957)

This commit is contained in:
behzad nouri 2023-01-27 21:02:51 +00:00 committed by GitHub
parent fdaba113ea
commit 7f173ce7c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 12 deletions

View File

@ -14,7 +14,6 @@ use {
solana_sdk::{
clock::{Slot, DEFAULT_MS_PER_SLOT},
feature_set,
genesis_config::ClusterType,
},
solana_streamer::streamer::{self, PacketBatchReceiver, StreamerReceiveStats},
std::{
@ -265,17 +264,15 @@ fn should_discard_packet(
#[must_use]
fn should_drop_merkle_shreds(shred_slot: Slot, root_bank: &Bank) -> bool {
root_bank.cluster_type() == ClusterType::Testnet
&& check_feature_activation(
&feature_set::drop_merkle_shreds::id(),
shred_slot,
root_bank,
)
&& !check_feature_activation(
&feature_set::keep_merkle_shreds::id(),
shred_slot,
root_bank,
)
check_feature_activation(
&feature_set::drop_merkle_shreds::id(),
shred_slot,
root_bank,
) && !check_feature_activation(
&feature_set::keep_merkle_shreds::id(),
shred_slot,
root_bank,
)
}
#[cfg(test)]