add ledger-tool verify verify-accounts-index option (#18375)

* add ledger-tool verify verify-accounts-index option

* comment, merge, respond to feedback, cleanup
This commit is contained in:
Jeff Washington (jwash)
2021-07-13 11:06:18 -05:00
committed by GitHub
parent 3e11468a04
commit d092fa1f03
8 changed files with 112 additions and 55 deletions

View File

@@ -645,6 +645,7 @@ pub fn bank_from_snapshot_archive<P>(
limit_load_slot_count_from_snapshot: Option<usize>,
shrink_ratio: AccountShrinkThreshold,
test_hash_calculation: bool,
verify_index: bool,
) -> Result<(Bank, BankFromArchiveTimings)>
where
P: AsRef<Path> + std::marker::Sync,
@@ -688,6 +689,7 @@ where
accounts_db_caching_enabled,
limit_load_slot_count_from_snapshot,
shrink_ratio,
verify_index,
)?;
measure.stop();
@@ -945,6 +947,7 @@ fn rebuild_bank_from_snapshots(
accounts_db_caching_enabled: bool,
limit_load_slot_count_from_snapshot: Option<usize>,
shrink_ratio: AccountShrinkThreshold,
verify_index: bool,
) -> Result<Bank> {
let (snapshot_version_enum, root_paths) =
verify_snapshot_version_and_folder(snapshot_version, unpacked_snapshots_dir)?;
@@ -967,6 +970,7 @@ fn rebuild_bank_from_snapshots(
accounts_db_caching_enabled,
limit_load_slot_count_from_snapshot,
shrink_ratio,
verify_index,
),
}?)
})?;
@@ -1500,6 +1504,7 @@ mod tests {
None,
AccountShrinkThreshold::default(),
false,
false,
)
.unwrap();
@@ -1588,6 +1593,7 @@ mod tests {
None,
AccountShrinkThreshold::default(),
false,
false,
)
.unwrap();