Skip to content

Commit

Permalink
fix assert
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Mar 31, 2023
1 parent 9600643 commit e7a9f11
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions runtime/src/in_mem_accounts_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1093,10 +1093,8 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> InMemAccountsIndex<T,
/// These were collected for this bin when we did batch inserts in the bg flush threads.
/// Insert these into the in-mem index, then return the duplicate (Slot, Pubkey)
pub(crate) fn populate_and_retrieve_duplicate_keys_from_startup(&self) -> Vec<(Slot, Pubkey)> {
let inserts = self.startup_info.insert.lock().unwrap();
// in order to return accurate and complete duplicates, we must have nothing left remaining to insert
assert!(inserts.is_empty());
drop(inserts);
assert!(self.startup_info.insert.lock().unwrap().is_empty());

let mut duplicate_items = self.startup_info.duplicates.lock().unwrap();
let duplicates = std::mem::take(&mut duplicate_items.duplicates);
Expand Down

0 comments on commit e7a9f11

Please sign in to comment.