get_storage_to_move_to_ancient_append_vec returns a single append vec (#29482)

get_storages_to_move_to_ancient_append_vec returns a single append vec
This commit is contained in:
Jeff Washington (jwash) 2023-01-05 09:31:26 -06:00 committed by GitHub
parent 221f547ba9
commit 8cdf5cdb50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -4306,7 +4306,7 @@ impl AccountsDb {
slot: Slot,
current_ancient: &mut CurrentAncientAppendVec,
can_randomly_shrink: bool,
) -> Option<SnapshotStorage> {
) -> Option<Arc<AccountStorageEntry>> {
self.storage
.get_slot_storage_entry(slot)
.and_then(|storage| {
@ -4316,7 +4316,7 @@ impl AccountsDb {
slot,
can_randomly_shrink,
)
.then_some(vec![storage])
.then_some(storage)
})
}
@ -4398,7 +4398,7 @@ impl AccountsDb {
let len = sorted_slots.len();
for slot in sorted_slots {
let old_storages = match self.get_storages_to_move_to_ancient_append_vec(
let old_storage = match self.get_storages_to_move_to_ancient_append_vec(
slot,
&mut current_ancient,
can_randomly_shrink,
@ -4419,6 +4419,7 @@ impl AccountsDb {
);
}
let old_storages = [old_storage];
self.combine_one_store_into_ancient(
slot,
&old_storages,