add comment (#17059)

This commit is contained in:
Jeff Washington (jwash)
2021-05-06 15:17:41 -05:00
committed by GitHub
parent ddfbae260f
commit 225ec00ec4

View File

@ -4947,6 +4947,9 @@ impl AccountsDb {
}
pub fn generate_index(&self) {
// BTreeMap because we want in-order traversal of oldest write_version to newest.
// Thus, all instances of an account in a store are added to the index in oldest to newest
// order and we update refcounts and track reclaims correctly.
type AccountsMap<'a> = HashMap<Pubkey, BTreeMap<u64, (AppendVecId, StoredAccountMeta<'a>)>>;
let mut slots = self.storage.all_slots();
#[allow(clippy::stable_sort_primitive)]