simplify api on reconstruct_single_storage (#21970)
This commit is contained in:
committed by
GitHub
parent
c04737ae69
commit
af53d2f692
@ -371,13 +371,12 @@ fn reconstruct_single_storage<E>(
|
|||||||
slot: &Slot,
|
slot: &Slot,
|
||||||
append_vec_path: &Path,
|
append_vec_path: &Path,
|
||||||
storage_entry: &E,
|
storage_entry: &E,
|
||||||
remapped_append_vec_id: Option<AppendVecId>,
|
append_vec_id: AppendVecId,
|
||||||
new_slot_storage: &mut HashMap<AppendVecId, Arc<AccountStorageEntry>>,
|
new_slot_storage: &mut HashMap<AppendVecId, Arc<AccountStorageEntry>>,
|
||||||
) -> Result<(), Error>
|
) -> Result<(), Error>
|
||||||
where
|
where
|
||||||
E: SerializableStorage,
|
E: SerializableStorage,
|
||||||
{
|
{
|
||||||
let append_vec_id = remapped_append_vec_id.unwrap_or_else(|| storage_entry.id());
|
|
||||||
let (accounts, num_accounts) =
|
let (accounts, num_accounts) =
|
||||||
AppendVec::new_from_file(append_vec_path, storage_entry.current_len())?;
|
AppendVec::new_from_file(append_vec_path, storage_entry.current_len())?;
|
||||||
let u_storage_entry =
|
let u_storage_entry =
|
||||||
@ -488,7 +487,7 @@ where
|
|||||||
slot,
|
slot,
|
||||||
&remapped_append_vec_path,
|
&remapped_append_vec_path,
|
||||||
storage_entry,
|
storage_entry,
|
||||||
Some(remapped_append_vec_id),
|
remapped_append_vec_id,
|
||||||
&mut new_slot_storage,
|
&mut new_slot_storage,
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user