add validator option --accounts-db-skip-shrink (#19028)

* add validator option --accounts-db-skip-shrink

* typo
This commit is contained in:
Jeff Washington (jwash)
2021-08-04 17:28:33 -05:00
committed by GitHub
parent 68cc71409e
commit 3280ae3e9f
9 changed files with 31 additions and 6 deletions

View File

@@ -844,6 +844,7 @@ pub fn bank_from_snapshot_archives<P>(
limit_load_slot_count_from_snapshot: Option<usize>,
shrink_ratio: AccountShrinkThreshold,
test_hash_calculation: bool,
accounts_db_skip_shrink: bool,
verify_index: bool,
) -> Result<(Bank, BankFromArchiveTimings)>
where
@@ -916,7 +917,7 @@ where
info!("{}", measure_rebuild);
let mut measure_verify = Measure::start("verify");
if !bank.verify_snapshot_bank(test_hash_calculation)
if !bank.verify_snapshot_bank(test_hash_calculation, accounts_db_skip_shrink)
&& limit_load_slot_count_from_snapshot.is_none()
{
panic!("Snapshot bank for slot {} failed to verify", bank.slot());
@@ -2497,6 +2498,7 @@ mod tests {
AccountShrinkThreshold::default(),
false,
false,
false,
)
.unwrap();
@@ -2587,6 +2589,7 @@ mod tests {
AccountShrinkThreshold::default(),
false,
false,
false,
)
.unwrap();
@@ -2696,6 +2699,7 @@ mod tests {
AccountShrinkThreshold::default(),
false,
false,
false,
)
.unwrap();