Skip to content

Commit

Permalink
Reorder base_wotking with accounts_hash to match other branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Czabaniuk committed Dec 1, 2023
1 parent 3c6b136 commit d0f7ff2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ledger-tool/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ pub fn get_accounts_db_config(

AccountsDbConfig {
index: Some(accounts_index_config),
base_working_path: Some(ledger_path.to_path_buf()),
accounts_hash_cache_path: Some(
ledger_path.join(AccountsDb::DEFAULT_ACCOUNTS_HASH_CACHE_DIR),
),
base_working_path: Some(ledger_path.to_path_buf()),
filler_accounts_config,
ancient_append_vec_offset: value_t!(arg_matches, "accounts_db_ancient_append_vecs", i64)
.ok(),
Expand Down
6 changes: 3 additions & 3 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ pub struct AccountsDb {
// used by tests
// holds this until we are dropped
#[allow(dead_code)]
temp_base_working_path: Option<TempDir>,
base_working_temp_dir: Option<TempDir>,
/// Directory for account hash calculations, within base_working_path
accounts_hash_cache_path: PathBuf,

Expand Down Expand Up @@ -2375,7 +2375,7 @@ impl AccountsDb {
let num_threads = get_thread_count();
const MAX_READ_ONLY_CACHE_DATA_SIZE: usize = 400_000_000; // 400M bytes

let (base_working_path, temp_base_working_path) =
let (base_working_path, base_working_temp_dir) =
if let Some(base_working_path) = base_working_path {
(base_working_path, None)
} else {
Expand Down Expand Up @@ -2423,7 +2423,7 @@ impl AccountsDb {
write_version: AtomicU64::new(0),
paths: vec![],
base_working_path,
temp_base_working_path,
base_working_temp_dir,
accounts_hash_cache_path,
shrink_paths: RwLock::new(None),
temp_paths: None,
Expand Down
2 changes: 1 addition & 1 deletion validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1181,8 +1181,8 @@ pub fn main() {

let accounts_db_config = AccountsDbConfig {
index: Some(accounts_index_config),
accounts_hash_cache_path: Some(accounts_hash_cache_path),
base_working_path: Some(ledger_path.clone()),
accounts_hash_cache_path: Some(accounts_hash_cache_path),
filler_accounts_config,
write_cache_limit_bytes: value_t!(matches, "accounts_db_cache_limit_mb", u64)
.ok()
Expand Down

0 comments on commit d0f7ff2

Please sign in to comment.