From e3dcff6a5c01945ec8a5d9184f59c7c5e3e07d4b Mon Sep 17 00:00:00 2001 From: Wen Date: Wed, 20 Dec 2023 19:34:43 -0800 Subject: [PATCH] EpochSchedule is now not copyable, clone it explicitly. --- gossip/src/duplicate_shred_handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gossip/src/duplicate_shred_handler.rs b/gossip/src/duplicate_shred_handler.rs index b6a3b98e5abb44..a7b1520f3ccc49 100644 --- a/gossip/src/duplicate_shred_handler.rs +++ b/gossip/src/duplicate_shred_handler.rs @@ -97,7 +97,7 @@ impl DuplicateShredHandler { self.last_root = last_root; if let Ok(bank_fork) = self.bank_forks.try_read() { let root_bank = bank_fork.root_bank(); - self.cached_epoch_schedule = Some(*root_bank.epoch_schedule()); + self.cached_epoch_schedule = Some(root_bank.epoch_schedule().clone()); let epoch_info = root_bank.get_epoch_info(); self.enable_gossip_duplicate_proof_ingestion_epoch = root_bank .feature_set @@ -148,7 +148,7 @@ impl DuplicateShredHandler { shred1.into_payload(), shred2.into_payload(), )?; - if let Some(epoch_schedule) = self.cached_epoch_schedule { + if let Some(epoch_schedule) = &self.cached_epoch_schedule { // feature_epoch could only be 0 in tests and new cluster setup. if self .enable_gossip_duplicate_proof_ingestion_epoch