Skip to content

Commit

Permalink
filter old retransmit shreds (#5068)
Browse files Browse the repository at this point in the history
  • Loading branch information
bw-solana authored Feb 26, 2025
1 parent 521aba4 commit ad43a7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion turbine/src/retransmit_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ fn retransmit_shred(
)> {
let key = shred::layout::get_shred_id(shred.as_ref())?;
let (slot_leader, cluster_nodes) = cache.get(&key.slot())?;
if shred_deduper.dedup(key, shred.as_ref(), MAX_DUPLICATE_COUNT) {
if key.slot() < root_bank.slot()
|| shred_deduper.dedup(key, shred.as_ref(), MAX_DUPLICATE_COUNT)
{
stats.num_shreds_skipped.fetch_add(1, Ordering::Relaxed);
return None;
}
Expand Down

0 comments on commit ad43a7d

Please sign in to comment.