Skip to content

Commit

Permalink
feature gates merkle shreds on all clusters (#29957)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7f173ce)
  • Loading branch information
behzadnouri authored and mergify[bot] committed Jan 27, 2023
1 parent 003f848 commit 47ac82a
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions core/src/shred_fetch_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit 47ac82a

Please sign in to comment.