get rid of Accounts new and default (#19100)

This commit is contained in:
Jeff Washington (jwash)
2021-08-06 15:52:27 -05:00
committed by GitHub
parent 216a1b3d74
commit f771063275
2 changed files with 9 additions and 32 deletions

View File

@@ -97,15 +97,6 @@ pub struct Accounts {
pub(crate) account_locks: Mutex<AccountLocks>,
}
impl Default for Accounts {
fn default() -> Self {
Self {
accounts_db: Arc::new(AccountsDb::default()),
account_locks: Mutex::default(),
}
}
}
// for the load instructions
pub type TransactionAccounts = Vec<(Pubkey, AccountSharedData)>;
pub type TransactionRent = u64;
@@ -133,20 +124,6 @@ impl Accounts {
}
}
pub fn new(
paths: Vec<PathBuf>,
cluster_type: &ClusterType,
shrink_ratio: AccountShrinkThreshold,
) -> Self {
Self::new_with_config(
paths,
cluster_type,
AccountSecondaryIndexes::default(),
false,
shrink_ratio,
)
}
pub fn new_with_config_for_benches(
paths: Vec<PathBuf>,
cluster_type: &ClusterType,