simplify api on reconstruct_single_storage (#21970)

This commit is contained in:
Jeff Washington (jwash) 2021-12-17 09:06:23 -06:00 committed by GitHub
parent c04737ae69
commit af53d2f692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -371,13 +371,12 @@ fn reconstruct_single_storage<E>(
slot: &Slot,
append_vec_path: &Path,
storage_entry: &E,
remapped_append_vec_id: Option<AppendVecId>,
append_vec_id: AppendVecId,
new_slot_storage: &mut HashMap<AppendVecId, Arc<AccountStorageEntry>>,
) -> Result<(), Error>
where
E: SerializableStorage,
{
let append_vec_id = remapped_append_vec_id.unwrap_or_else(|| storage_entry.id());
let (accounts, num_accounts) =
AppendVec::new_from_file(append_vec_path, storage_entry.current_len())?;
let u_storage_entry =
@ -488,7 +487,7 @@ where
slot,
&remapped_append_vec_path,
storage_entry,
Some(remapped_append_vec_id),
remapped_append_vec_id,
&mut new_slot_storage,
)?;
}