From 445e6668c2e309b430b8f74ccfcb9a1feda30397 Mon Sep 17 00:00:00 2001 From: carllin Date: Wed, 6 May 2020 11:44:49 -0700 Subject: [PATCH] Fix (#9896) Co-authored-by: Carl --- core/src/replay_stage.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index 226fd0c904..08ad1615fa 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -496,10 +496,14 @@ impl ReplayStage { bank_forks: &RwLock, ) { error!("purging slot {}", duplicate_slot); - let empty = HashSet::new(); - let slot_descendants = descendants.get(&duplicate_slot).unwrap_or(&empty); + let slot_descendants = descendants.get(&duplicate_slot); + if slot_descendants.is_none() { + // Root has already moved past this slot, no need to purge it + return; + } for d in slot_descendants + .unwrap() .iter() .chain(std::iter::once(&duplicate_slot)) {