diff --git a/gossip/src/duplicate_shred_handler.rs b/gossip/src/duplicate_shred_handler.rs index 8bcbee53cae875..e7b4cd0466fe75 100644 --- a/gossip/src/duplicate_shred_handler.rs +++ b/gossip/src/duplicate_shred_handler.rs @@ -151,15 +151,14 @@ impl DuplicateShredHandler { fn should_notify_state_machine(&self, slot: Slot) -> bool { let root_bank = self.bank_forks.read().unwrap().root_bank(); - let activated_slot = root_bank + let Some(activated_slot) = root_bank .feature_set .activated_slot(&feature_set::enable_gossip_duplicate_proof_ingestion::id()) - .map(|slot| root_bank.epoch_schedule().get_epoch(slot)); - activated_slot.is_some_and(|feature_epoch| { - root_bank.epoch_schedule().get_epoch(slot) > feature_epoch - // feature_epoch could only be 0 in tests and new cluster setup. - || feature_epoch == 0 - }) + else { + return false; + }; + root_bank.epoch_schedule().get_epoch(slot) + > root_bank.epoch_schedule().get_epoch(activated_slot) } fn should_consume_slot(&mut self, slot: Slot) -> bool {