remove AccountsDb::new() from public api (#19098)

This commit is contained in:
Jeff Washington (jwash) 2021-08-06 13:07:50 -05:00 committed by GitHub
parent 41f4973f0d
commit c12289fd1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -1407,7 +1407,8 @@ impl AccountsDb {
}
}
pub fn new(paths: Vec<PathBuf>, cluster_type: &ClusterType) -> Self {
pub fn new_for_tests(paths: Vec<PathBuf>, cluster_type: &ClusterType) -> Self {
// will diverge
AccountsDb::new_with_config(
paths,
cluster_type,
@ -1417,11 +1418,6 @@ impl AccountsDb {
)
}
pub fn new_for_tests(paths: Vec<PathBuf>, cluster_type: &ClusterType) -> Self {
// will diverge
Self::new(paths, cluster_type)
}
pub fn new_with_config(
paths: Vec<PathBuf>,
cluster_type: &ClusterType,
@ -6186,6 +6182,10 @@ impl AccountsDb {
#[cfg(test)]
impl AccountsDb {
pub fn new(paths: Vec<PathBuf>, cluster_type: &ClusterType) -> Self {
Self::new_for_tests(paths, cluster_type)
}
pub fn new_sized(paths: Vec<PathBuf>, file_size: u64) -> Self {
AccountsDb {
file_size,