AcctIdx: handle future config defaults (#19967)

This commit is contained in:
Jeff Washington (jwash)
2021-09-17 13:12:06 -05:00
committed by GitHub
parent 0404e75e96
commit 99f5684dc4
3 changed files with 14 additions and 10 deletions

View File

@ -2487,12 +2487,13 @@ pub fn main() {
_ => unreachable!(),
};
let accounts_index_config = value_t!(matches, "accounts_index_bins", usize)
.ok()
.map(|bins| AccountsIndexConfig { bins: Some(bins) });
let mut accounts_index_config = AccountsIndexConfig::default();
if let Some(bins) = value_t!(matches, "accounts_index_bins", usize).ok() {
accounts_index_config.bins = Some(bins);
}
let accounts_db_config = Some(AccountsDbConfig {
index: accounts_index_config,
index: Some(accounts_index_config),
accounts_hash_cache_path: Some(ledger_path.clone()),
});