Enable accounts caching by default (#14854)

Co-authored-by: Carl Lin <carl@solana.com>
This commit is contained in:
sakridge 2021-01-26 12:06:39 -08:00 committed by GitHub
parent ff22091a98
commit 5bf5a5ec41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

1
run.sh
View File

@ -105,7 +105,6 @@ args=(
--init-complete-file "$dataDir"/init-completed
--snapshot-compression none
--require-tower
--accounts-db-caching-enabled
)
# shellcheck disable=SC2086
solana-validator "${args[@]}" $SOLANA_RUN_SH_VALIDATOR_ARGS &

View File

@ -1443,9 +1443,16 @@ pub fn main() {
.help("Enable an accounts index, indexed by the selected account field"),
)
.arg(
Arg::with_name("no_accounts_db_caching")
.long("no-accounts-db-caching")
.help("Disables accounts caching"),
)
.arg(
// legacy nop argument
Arg::with_name("accounts_db_caching_enabled")
.long("accounts-db-caching-enabled")
.help("Enable accounts caching"),
.conflicts_with("no_accounts_db_caching")
.hidden(true)
)
.get_matches();
@ -1621,7 +1628,7 @@ pub fn main() {
poh_pinned_cpu_core: value_of(&matches, "poh_pinned_cpu_core")
.unwrap_or(poh_service::DEFAULT_PINNED_CPU_CORE),
account_indexes,
accounts_db_caching_enabled: matches.is_present("accounts_db_caching_enabled"),
accounts_db_caching_enabled: !matches.is_present("no_accounts_db_caching"),
..ValidatorConfig::default()
};