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

@ -138,6 +138,7 @@ pub struct ValidatorConfig {
pub accounts_db_caching_enabled: bool,
pub warp_slot: Option<Slot>,
pub accounts_db_test_hash_calculation: bool,
pub accounts_db_skip_shrink: bool,
pub accounts_db_use_index_hash_calculation: bool,
pub tpu_coalesce_ms: u64,
pub validator_exit: Arc<RwLock<Exit>>,
@ -194,6 +195,7 @@ impl Default for ValidatorConfig {
accounts_db_caching_enabled: false,
warp_slot: None,
accounts_db_test_hash_calculation: false,
accounts_db_skip_shrink: false,
accounts_db_use_index_hash_calculation: true,
tpu_coalesce_ms: DEFAULT_TPU_COALESCE_MS,
validator_exit: Arc::new(RwLock::new(Exit::default())),
@ -1131,6 +1133,8 @@ fn new_banks_from_ledger(
account_indexes: config.account_indexes.clone(),
accounts_db_caching_enabled: config.accounts_db_caching_enabled,
shrink_ratio: config.accounts_shrink_ratio,
accounts_db_test_hash_calculation: config.accounts_db_test_hash_calculation,
accounts_db_skip_shrink: config.accounts_db_skip_shrink,
..blockstore_processor::ProcessOptions::default()
};