Add base_slot to get_snapshot_storages() (#19348)
This commit is contained in:
@@ -28,7 +28,9 @@ 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(), None).0;
|
||||
let storage_entries = accounts_db
|
||||
.get_snapshot_storages(Slot::max_value(), None, None)
|
||||
.0;
|
||||
let mut unpacked_append_vec_map = UnpackedAppendVecMap::new();
|
||||
for storage in storage_entries.iter().flatten() {
|
||||
let storage_path = storage.get_path();
|
||||
@@ -151,7 +153,7 @@ fn test_accounts_serialize_style(serde_style: SerdeStyle) {
|
||||
&mut writer,
|
||||
&*accounts.accounts_db,
|
||||
0,
|
||||
&accounts.accounts_db.get_snapshot_storages(0, None).0,
|
||||
&accounts.accounts_db.get_snapshot_storages(0, None, None).0,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -203,7 +205,7 @@ fn test_bank_serialize_style(serde_style: SerdeStyle) {
|
||||
bank2.squash();
|
||||
bank2.force_flush_accounts_cache();
|
||||
|
||||
let snapshot_storages = bank2.get_snapshot_storages();
|
||||
let snapshot_storages = bank2.get_snapshot_storages(None);
|
||||
let mut buf = vec![];
|
||||
let mut writer = Cursor::new(&mut buf);
|
||||
crate::serde_snapshot::bank_to_stream(
|
||||
@@ -259,7 +261,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, None).0;
|
||||
let snapshot_storages = accounts.get_snapshot_storages(slot, None, None).0;
|
||||
accountsdb_to_stream(
|
||||
SerdeStyle::Newer,
|
||||
&mut writer,
|
||||
@@ -321,7 +323,7 @@ mod test_bank_serialize {
|
||||
.rc
|
||||
.accounts
|
||||
.accounts_db
|
||||
.get_snapshot_storages(0, None)
|
||||
.get_snapshot_storages(0, None, None)
|
||||
.0;
|
||||
// ensure there is a single snapshot storage example for ABI digesting
|
||||
assert_eq!(snapshot_storages.len(), 1);
|
||||
|
Reference in New Issue
Block a user