From 602da5e51f10222e1b2c4f0460e4ef0ea1c2311e Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Sun, 10 Jul 2022 19:42:06 -0500 Subject: [PATCH] add accounts db config to bank tests (#26517) --- core/tests/snapshots.rs | 1 + ledger/src/blockstore_processor.rs | 1 + runtime/src/bank.rs | 4 +++- runtime/src/snapshot_utils.rs | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/tests/snapshots.rs b/core/tests/snapshots.rs index 2ad8c06235..87d9baec2c 100644 --- a/core/tests/snapshots.rs +++ b/core/tests/snapshots.rs @@ -101,6 +101,7 @@ impl SnapshotTestConfig { false, accounts_db::AccountShrinkThreshold::default(), false, + None, ); bank0.freeze(); let mut bank_forks = BankForks::new(bank0); diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index ce63057303..7bfad1943a 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -3656,6 +3656,7 @@ pub mod tests { false, AccountShrinkThreshold::default(), false, + None, ); *bank.epoch_schedule() } diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index d9cc1db105..e5c8320d86 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -1475,6 +1475,7 @@ impl Bank { accounts_db_caching_enabled, shrink_ratio, false, + None, ) } @@ -1556,6 +1557,7 @@ impl Bank { accounts_db_caching_enabled: bool, shrink_ratio: AccountShrinkThreshold, debug_do_not_add_builtins: bool, + accounts_db_config: Option, ) -> Self { Self::new_with_paths( genesis_config, @@ -1566,7 +1568,7 @@ impl Bank { accounts_db_caching_enabled, shrink_ratio, debug_do_not_add_builtins, - Some(ACCOUNTS_DB_CONFIG_FOR_TESTING), + accounts_db_config.or(Some(ACCOUNTS_DB_CONFIG_FOR_TESTING)), None, ) } diff --git a/runtime/src/snapshot_utils.rs b/runtime/src/snapshot_utils.rs index d276741c53..895f68d0bb 100644 --- a/runtime/src/snapshot_utils.rs +++ b/runtime/src/snapshot_utils.rs @@ -3539,6 +3539,7 @@ mod tests { false, AccountShrinkThreshold::default(), false, + None, )); bank0 .transfer(lamports_to_transfer, &mint_keypair, &key2.pubkey())