automerge
This commit is contained in:
mergify[bot]
2020-05-06 13:31:02 -07:00
committed by GitHub
parent f72c186004
commit 614ad64ec1

View File

@ -496,10 +496,14 @@ impl ReplayStage {
bank_forks: &RwLock<BankForks>, bank_forks: &RwLock<BankForks>,
) { ) {
error!("purging slot {}", duplicate_slot); error!("purging slot {}", duplicate_slot);
let empty = HashSet::new(); let slot_descendants = descendants.get(&duplicate_slot);
let slot_descendants = descendants.get(&duplicate_slot).unwrap_or(&empty); if slot_descendants.is_none() {
// Root has already moved past this slot, no need to purge it
return;
}
for d in slot_descendants for d in slot_descendants
.unwrap()
.iter() .iter()
.chain(std::iter::once(&duplicate_slot)) .chain(std::iter::once(&duplicate_slot))
{ {