Skip to content

Commit

Permalink
feature gates merkle shreds on all clusters (backport #29957) (#29960)
Browse files Browse the repository at this point in the history
feature gates merkle shreds on all clusters (#29957)

(cherry picked from commit 7f173ce)

Co-authored-by: behzad nouri <[email protected]>
  • Loading branch information
mergify[bot] and behzadnouri authored Jan 28, 2023
1 parent 003f848 commit 27e7b52
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 27e7b52

Please sign in to comment.