feature gates merkle shreds on all clusters (#29957)
This commit is contained in:
parent
fdaba113ea
commit
7f173ce7c7
|
@ -14,7 +14,6 @@ use {
|
||||||
solana_sdk::{
|
solana_sdk::{
|
||||||
clock::{Slot, DEFAULT_MS_PER_SLOT},
|
clock::{Slot, DEFAULT_MS_PER_SLOT},
|
||||||
feature_set,
|
feature_set,
|
||||||
genesis_config::ClusterType,
|
|
||||||
},
|
},
|
||||||
solana_streamer::streamer::{self, PacketBatchReceiver, StreamerReceiveStats},
|
solana_streamer::streamer::{self, PacketBatchReceiver, StreamerReceiveStats},
|
||||||
std::{
|
std::{
|
||||||
|
@ -265,17 +264,15 @@ fn should_discard_packet(
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
fn should_drop_merkle_shreds(shred_slot: Slot, root_bank: &Bank) -> bool {
|
fn should_drop_merkle_shreds(shred_slot: Slot, root_bank: &Bank) -> bool {
|
||||||
root_bank.cluster_type() == ClusterType::Testnet
|
check_feature_activation(
|
||||||
&& check_feature_activation(
|
&feature_set::drop_merkle_shreds::id(),
|
||||||
&feature_set::drop_merkle_shreds::id(),
|
shred_slot,
|
||||||
shred_slot,
|
root_bank,
|
||||||
root_bank,
|
) && !check_feature_activation(
|
||||||
)
|
&feature_set::keep_merkle_shreds::id(),
|
||||||
&& !check_feature_activation(
|
shred_slot,
|
||||||
&feature_set::keep_merkle_shreds::id(),
|
root_bank,
|
||||||
shred_slot,
|
)
|
||||||
root_bank,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
Loading…
Reference in New Issue