diff --git a/run.sh b/run.sh index 613a1f4f7..7833a8456 100755 --- a/run.sh +++ b/run.sh @@ -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 & diff --git a/validator/src/main.rs b/validator/src/main.rs index da7b503c0..c71840773 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -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() };