add Ancestors to get_snapshot_storages to prepare for the future (#17591)
This commit is contained in:
committed by
GitHub
parent
ef5169ff24
commit
c8fdf0762c
@@ -28,7 +28,7 @@ fn copy_append_vecs<P: AsRef<Path>>(
|
||||
accounts_db: &AccountsDb,
|
||||
output_dir: P,
|
||||
) -> std::io::Result<UnpackedAppendVecMap> {
|
||||
let storage_entries = accounts_db.get_snapshot_storages(Slot::max_value());
|
||||
let storage_entries = accounts_db.get_snapshot_storages(Slot::max_value(), None);
|
||||
let mut unpacked_append_vec_map = UnpackedAppendVecMap::new();
|
||||
for storage in storage_entries.iter().flatten() {
|
||||
let storage_path = storage.get_path();
|
||||
@@ -142,7 +142,7 @@ fn test_accounts_serialize_style(serde_style: SerdeStyle) {
|
||||
&mut writer,
|
||||
&*accounts.accounts_db,
|
||||
0,
|
||||
&accounts.accounts_db.get_snapshot_storages(0),
|
||||
&accounts.accounts_db.get_snapshot_storages(0, None),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -243,7 +243,7 @@ pub(crate) fn reconstruct_accounts_db_via_serialization(
|
||||
slot: Slot,
|
||||
) -> AccountsDb {
|
||||
let mut writer = Cursor::new(vec![]);
|
||||
let snapshot_storages = accounts.get_snapshot_storages(slot);
|
||||
let snapshot_storages = accounts.get_snapshot_storages(slot, None);
|
||||
accountsdb_to_stream(
|
||||
SerdeStyle::Newer,
|
||||
&mut writer,
|
||||
@@ -301,7 +301,7 @@ mod test_bank_serialize {
|
||||
where
|
||||
S: serde::Serializer,
|
||||
{
|
||||
let snapshot_storages = bank.rc.accounts.accounts_db.get_snapshot_storages(0);
|
||||
let snapshot_storages = bank.rc.accounts.accounts_db.get_snapshot_storages(0, None);
|
||||
// ensure there is a single snapshot storage example for ABI digesting
|
||||
assert_eq!(snapshot_storages.len(), 1);
|
||||
|
||||
|
Reference in New Issue
Block a user