Remove frozen account support
This commit is contained in:
@ -47,7 +47,6 @@ fn test_accounts_create(bencher: &mut Bencher) {
|
||||
let bank0 = Bank::new_with_paths_for_benches(
|
||||
&genesis_config,
|
||||
vec![PathBuf::from("bench_a0")],
|
||||
&[],
|
||||
None,
|
||||
None,
|
||||
AccountSecondaryIndexes::default(),
|
||||
@ -68,7 +67,6 @@ fn test_accounts_squash(bencher: &mut Bencher) {
|
||||
let mut prev_bank = Arc::new(Bank::new_with_paths_for_benches(
|
||||
&genesis_config,
|
||||
vec![PathBuf::from("bench_a1")],
|
||||
&[],
|
||||
None,
|
||||
None,
|
||||
AccountSecondaryIndexes::default(),
|
||||
|
@ -44,7 +44,6 @@ use dashmap::{
|
||||
mapref::entry::Entry::{Occupied, Vacant},
|
||||
DashMap, DashSet,
|
||||
};
|
||||
use lazy_static::lazy_static;
|
||||
use log::*;
|
||||
use rand::{prelude::SliceRandom, thread_rng, Rng};
|
||||
use rayon::{prelude::*, ThreadPool};
|
||||
@ -57,7 +56,7 @@ use solana_sdk::{
|
||||
clock::{BankId, Epoch, Slot, SlotCount},
|
||||
epoch_schedule::EpochSchedule,
|
||||
genesis_config::ClusterType,
|
||||
hash::{Hash, Hasher},
|
||||
hash::Hash,
|
||||
pubkey::Pubkey,
|
||||
timing::AtomicInterval,
|
||||
};
|
||||
@ -165,12 +164,6 @@ const ABSURD_CONSECUTIVE_FAILED_ITERATIONS: usize = 100;
|
||||
|
||||
type DashMapVersionHash = DashMap<Pubkey, (u64, Hash)>;
|
||||
|
||||
lazy_static! {
|
||||
// FROZEN_ACCOUNT_PANIC is used to signal local_cluster that an AccountsDb panic has occurred,
|
||||
// as |cargo test| cannot observe panics in other threads
|
||||
pub static ref FROZEN_ACCOUNT_PANIC: Arc<AtomicBool> = Arc::new(AtomicBool::new(false));
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum AccountShrinkThreshold {
|
||||
/// Measure the total space sparseness across all candididates
|
||||
@ -868,12 +861,6 @@ pub struct BankHashInfo {
|
||||
pub stats: BankHashStats,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct FrozenAccountInfo {
|
||||
pub hash: Hash, // Hash generated by hash_frozen_account_data()
|
||||
pub lamports: u64, // Account balance cannot be lower than this amount
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct StoreAccountsTiming {
|
||||
store_accounts_elapsed: u64,
|
||||
@ -1008,9 +995,6 @@ pub struct AccountsDb {
|
||||
/// Starting file size of appendvecs
|
||||
file_size: u64,
|
||||
|
||||
/// Accounts that will cause a panic! if data modified or lamports decrease
|
||||
frozen_accounts: HashMap<Pubkey, FrozenAccountInfo>,
|
||||
|
||||
/// Thread pool used for par_iter
|
||||
pub thread_pool: ThreadPool,
|
||||
|
||||
@ -1585,7 +1569,6 @@ impl AccountsDb {
|
||||
thread_pool_clean: make_min_priority_thread_pool(),
|
||||
min_num_stores: num_threads,
|
||||
bank_hashes: RwLock::new(bank_hashes),
|
||||
frozen_accounts: HashMap::new(),
|
||||
external_purge_slots_stats: PurgeStats::default(),
|
||||
clean_accounts_stats: CleanAccountsStats::default(),
|
||||
shrink_stats: ShrinkStats::default(),
|
||||
@ -4351,21 +4334,6 @@ impl AccountsDb {
|
||||
)
|
||||
}
|
||||
|
||||
fn hash_frozen_account_data(account: &AccountSharedData) -> Hash {
|
||||
let mut hasher = Hasher::default();
|
||||
|
||||
hasher.hash(account.data());
|
||||
hasher.hash(account.owner().as_ref());
|
||||
|
||||
if account.executable() {
|
||||
hasher.hash(&[1u8; 1]);
|
||||
} else {
|
||||
hasher.hash(&[0u8; 1]);
|
||||
}
|
||||
|
||||
hasher.result()
|
||||
}
|
||||
|
||||
fn hash_account_data(
|
||||
slot: Slot,
|
||||
lamports: u64,
|
||||
@ -6204,58 +6172,6 @@ impl AccountsDb {
|
||||
.fetch_add(measure.as_us(), Ordering::Relaxed);
|
||||
}
|
||||
|
||||
pub(crate) fn freeze_accounts(&mut self, ancestors: &Ancestors, account_pubkeys: &[Pubkey]) {
|
||||
for account_pubkey in account_pubkeys {
|
||||
if let Some((account, _slot)) = self.load_without_fixed_root(ancestors, account_pubkey)
|
||||
{
|
||||
let frozen_account_info = FrozenAccountInfo {
|
||||
hash: Self::hash_frozen_account_data(&account),
|
||||
lamports: account.lamports(),
|
||||
};
|
||||
warn!(
|
||||
"Account {} is now frozen at lamports={}, hash={}",
|
||||
account_pubkey, frozen_account_info.lamports, frozen_account_info.hash
|
||||
);
|
||||
self.frozen_accounts
|
||||
.insert(*account_pubkey, frozen_account_info);
|
||||
} else {
|
||||
panic!(
|
||||
"Unable to freeze an account that does not exist: {}",
|
||||
account_pubkey
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Cause a panic if frozen accounts would be affected by data in `accounts`
|
||||
fn assert_frozen_accounts(&self, accounts: &[(&Pubkey, &AccountSharedData)]) {
|
||||
if self.frozen_accounts.is_empty() {
|
||||
return;
|
||||
}
|
||||
for (account_pubkey, account) in accounts.iter() {
|
||||
if let Some(frozen_account_info) = self.frozen_accounts.get(*account_pubkey) {
|
||||
if account.lamports() < frozen_account_info.lamports {
|
||||
FROZEN_ACCOUNT_PANIC.store(true, Ordering::Relaxed);
|
||||
panic!(
|
||||
"Frozen account {} modified. Lamports decreased from {} to {}",
|
||||
account_pubkey,
|
||||
frozen_account_info.lamports,
|
||||
account.lamports(),
|
||||
)
|
||||
}
|
||||
|
||||
let hash = Self::hash_frozen_account_data(account);
|
||||
if hash != frozen_account_info.hash {
|
||||
FROZEN_ACCOUNT_PANIC.store(true, Ordering::Relaxed);
|
||||
panic!(
|
||||
"Frozen account {} modified. Hash changed from {} to {}",
|
||||
account_pubkey, frozen_account_info.hash, hash,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn store_cached(&self, slot: Slot, accounts: &[(&Pubkey, &AccountSharedData)]) {
|
||||
self.store(slot, accounts, self.caching_enabled);
|
||||
}
|
||||
@ -6272,7 +6188,6 @@ impl AccountsDb {
|
||||
if accounts.is_empty() {
|
||||
return;
|
||||
}
|
||||
self.assert_frozen_accounts(accounts);
|
||||
|
||||
let mut stats = BankHashStats::default();
|
||||
let mut total_data = 0;
|
||||
@ -9674,139 +9589,6 @@ pub mod tests {
|
||||
assert_eq!(ret.0.data().len(), data_len);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hash_frozen_account_data() {
|
||||
let account = AccountSharedData::new(1, 42, &Pubkey::default());
|
||||
|
||||
let hash = AccountsDb::hash_frozen_account_data(&account);
|
||||
assert_ne!(hash, Hash::default()); // Better not be the default Hash
|
||||
|
||||
// Lamports changes to not affect the hash
|
||||
let mut account_modified = account.clone();
|
||||
account_modified.checked_sub_lamports(1).unwrap();
|
||||
assert_eq!(
|
||||
hash,
|
||||
AccountsDb::hash_frozen_account_data(&account_modified)
|
||||
);
|
||||
|
||||
// Rent epoch may changes to not affect the hash
|
||||
let mut account_modified = account.clone();
|
||||
account_modified.set_rent_epoch(account_modified.rent_epoch() + 1);
|
||||
assert_eq!(
|
||||
hash,
|
||||
AccountsDb::hash_frozen_account_data(&account_modified)
|
||||
);
|
||||
|
||||
// Account data may not be modified
|
||||
let mut account_modified = account.clone();
|
||||
account_modified.data_as_mut_slice()[0] = 42;
|
||||
assert_ne!(
|
||||
hash,
|
||||
AccountsDb::hash_frozen_account_data(&account_modified)
|
||||
);
|
||||
|
||||
// Owner may not be modified
|
||||
let mut account_modified = account.clone();
|
||||
account_modified
|
||||
.set_owner(Pubkey::from_str("My11111111111111111111111111111111111111111").unwrap());
|
||||
assert_ne!(
|
||||
hash,
|
||||
AccountsDb::hash_frozen_account_data(&account_modified)
|
||||
);
|
||||
|
||||
// Executable may not be modified
|
||||
let mut account_modified = account;
|
||||
account_modified.set_executable(true);
|
||||
assert_ne!(
|
||||
hash,
|
||||
AccountsDb::hash_frozen_account_data(&account_modified)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_frozen_account_lamport_increase() {
|
||||
let frozen_pubkey =
|
||||
Pubkey::from_str("My11111111111111111111111111111111111111111").unwrap();
|
||||
let mut db = AccountsDb::new(Vec::new(), &ClusterType::Development);
|
||||
|
||||
let mut account = AccountSharedData::new(1, 42, &frozen_pubkey);
|
||||
db.store_uncached(0, &[(&frozen_pubkey, &account)]);
|
||||
|
||||
let ancestors = vec![(0, 0)].into_iter().collect();
|
||||
db.freeze_accounts(&ancestors, &[frozen_pubkey]);
|
||||
|
||||
// Store with no account changes is ok
|
||||
db.store_uncached(0, &[(&frozen_pubkey, &account)]);
|
||||
|
||||
// Store with an increase in lamports is ok
|
||||
account.set_lamports(2);
|
||||
db.store_uncached(0, &[(&frozen_pubkey, &account)]);
|
||||
|
||||
// Store with an decrease that does not go below the frozen amount of lamports is tolerated
|
||||
account.set_lamports(1);
|
||||
db.store_uncached(0, &[(&frozen_pubkey, &account)]);
|
||||
|
||||
// A store of any value over the frozen value of '1' across different slots is also ok
|
||||
account.set_lamports(3);
|
||||
db.store_uncached(1, &[(&frozen_pubkey, &account)]);
|
||||
account.set_lamports(2);
|
||||
db.store_uncached(2, &[(&frozen_pubkey, &account)]);
|
||||
account.set_lamports(1);
|
||||
db.store_uncached(3, &[(&frozen_pubkey, &account)]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(
|
||||
expected = "Frozen account My11111111111111111111111111111111111111111 modified. Lamports decreased from 1 to 0"
|
||||
)]
|
||||
fn test_frozen_account_lamport_decrease() {
|
||||
let frozen_pubkey =
|
||||
Pubkey::from_str("My11111111111111111111111111111111111111111").unwrap();
|
||||
let mut db = AccountsDb::new(Vec::new(), &ClusterType::Development);
|
||||
|
||||
let mut account = AccountSharedData::new(1, 42, &frozen_pubkey);
|
||||
db.store_uncached(0, &[(&frozen_pubkey, &account)]);
|
||||
|
||||
let ancestors = vec![(0, 0)].into_iter().collect();
|
||||
db.freeze_accounts(&ancestors, &[frozen_pubkey]);
|
||||
|
||||
// Store with a decrease below the frozen amount of lamports is not ok
|
||||
account.checked_sub_lamports(1).unwrap();
|
||||
db.store_uncached(0, &[(&frozen_pubkey, &account)]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(
|
||||
expected = "Unable to freeze an account that does not exist: My11111111111111111111111111111111111111111"
|
||||
)]
|
||||
fn test_frozen_account_nonexistent() {
|
||||
let frozen_pubkey =
|
||||
Pubkey::from_str("My11111111111111111111111111111111111111111").unwrap();
|
||||
let mut db = AccountsDb::new(Vec::new(), &ClusterType::Development);
|
||||
|
||||
let ancestors = vec![(0, 0)].into_iter().collect();
|
||||
db.freeze_accounts(&ancestors, &[frozen_pubkey]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(
|
||||
expected = "Frozen account My11111111111111111111111111111111111111111 modified. Hash changed from 8wHcxDkjiwdrkPAsDnmNrF1UDGJFAtZzPQBSVweY3yRA to JdscGYB1uczVssmYuJusDD1Bfe6wpNeeho8XjcH8inN"
|
||||
)]
|
||||
fn test_frozen_account_data_modified() {
|
||||
let frozen_pubkey =
|
||||
Pubkey::from_str("My11111111111111111111111111111111111111111").unwrap();
|
||||
let mut db = AccountsDb::new(Vec::new(), &ClusterType::Development);
|
||||
|
||||
let mut account = AccountSharedData::new(1, 42, &frozen_pubkey);
|
||||
db.store_uncached(0, &[(&frozen_pubkey, &account)]);
|
||||
|
||||
let ancestors = vec![(0, 0)].into_iter().collect();
|
||||
db.freeze_accounts(&ancestors, &[frozen_pubkey]);
|
||||
|
||||
account.data_as_mut_slice()[0] = 42;
|
||||
db.store_uncached(0, &[(&frozen_pubkey, &account)]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_stored_readable_account() {
|
||||
let lamports = 1;
|
||||
|
@ -1065,7 +1065,6 @@ impl Bank {
|
||||
Self::new_with_paths_for_tests(
|
||||
genesis_config,
|
||||
Vec::new(),
|
||||
&[],
|
||||
None,
|
||||
None,
|
||||
AccountSecondaryIndexes::default(),
|
||||
@ -1079,7 +1078,6 @@ impl Bank {
|
||||
let mut bank = Self::new_with_paths_for_tests(
|
||||
genesis_config,
|
||||
Vec::new(),
|
||||
&[],
|
||||
None,
|
||||
None,
|
||||
AccountSecondaryIndexes::default(),
|
||||
@ -1102,7 +1100,6 @@ impl Bank {
|
||||
Self::new_with_paths_for_tests(
|
||||
genesis_config,
|
||||
Vec::new(),
|
||||
&[],
|
||||
None,
|
||||
None,
|
||||
account_indexes,
|
||||
@ -1175,7 +1172,6 @@ impl Bank {
|
||||
pub fn new_with_paths_for_tests(
|
||||
genesis_config: &GenesisConfig,
|
||||
paths: Vec<PathBuf>,
|
||||
frozen_account_pubkeys: &[Pubkey],
|
||||
debug_keys: Option<Arc<HashSet<Pubkey>>>,
|
||||
additional_builtins: Option<&Builtins>,
|
||||
account_indexes: AccountSecondaryIndexes,
|
||||
@ -1186,7 +1182,6 @@ impl Bank {
|
||||
Self::new_with_paths(
|
||||
genesis_config,
|
||||
paths,
|
||||
frozen_account_pubkeys,
|
||||
debug_keys,
|
||||
additional_builtins,
|
||||
account_indexes,
|
||||
@ -1201,7 +1196,6 @@ impl Bank {
|
||||
pub fn new_with_paths_for_benches(
|
||||
genesis_config: &GenesisConfig,
|
||||
paths: Vec<PathBuf>,
|
||||
frozen_account_pubkeys: &[Pubkey],
|
||||
debug_keys: Option<Arc<HashSet<Pubkey>>>,
|
||||
additional_builtins: Option<&Builtins>,
|
||||
account_indexes: AccountSecondaryIndexes,
|
||||
@ -1212,7 +1206,6 @@ impl Bank {
|
||||
Self::new_with_paths(
|
||||
genesis_config,
|
||||
paths,
|
||||
frozen_account_pubkeys,
|
||||
debug_keys,
|
||||
additional_builtins,
|
||||
account_indexes,
|
||||
@ -1228,7 +1221,6 @@ impl Bank {
|
||||
pub fn new_with_paths(
|
||||
genesis_config: &GenesisConfig,
|
||||
paths: Vec<PathBuf>,
|
||||
frozen_account_pubkeys: &[Pubkey],
|
||||
debug_keys: Option<Arc<HashSet<Pubkey>>>,
|
||||
additional_builtins: Option<&Builtins>,
|
||||
account_indexes: AccountSecondaryIndexes,
|
||||
@ -1259,11 +1251,6 @@ impl Bank {
|
||||
debug_do_not_add_builtins,
|
||||
);
|
||||
|
||||
// Freeze accounts after process_genesis_config creates the initial append vecs
|
||||
Arc::get_mut(&mut Arc::get_mut(&mut bank.rc.accounts).unwrap().accounts_db)
|
||||
.unwrap()
|
||||
.freeze_accounts(&bank.ancestors, frozen_account_pubkeys);
|
||||
|
||||
// genesis needs stakes for all epochs up to the epoch implied by
|
||||
// slot = 0 and genesis configuration
|
||||
{
|
||||
@ -13386,7 +13373,6 @@ pub(crate) mod tests {
|
||||
let bank0 = Arc::new(Bank::new_with_paths_for_tests(
|
||||
&genesis_config,
|
||||
Vec::new(),
|
||||
&[],
|
||||
None,
|
||||
Some(&builtins),
|
||||
AccountSecondaryIndexes::default(),
|
||||
|
@ -7,7 +7,6 @@ use {
|
||||
},
|
||||
accounts_index::AccountSecondaryIndexes,
|
||||
accounts_update_notifier_interface::AccountsUpdateNotifier,
|
||||
ancestors::Ancestors,
|
||||
append_vec::{AppendVec, StoredMetaWriteVersion},
|
||||
bank::{Bank, BankFieldsToDeserialize, BankRc},
|
||||
blockhash_queue::BlockhashQueue,
|
||||
@ -196,7 +195,6 @@ pub(crate) fn bank_from_streams<R>(
|
||||
account_paths: &[PathBuf],
|
||||
unpacked_append_vec_map: UnpackedAppendVecMap,
|
||||
genesis_config: &GenesisConfig,
|
||||
frozen_account_pubkeys: &[Pubkey],
|
||||
debug_keys: Option<Arc<HashSet<Pubkey>>>,
|
||||
additional_builtins: Option<&Builtins>,
|
||||
account_secondary_indexes: AccountSecondaryIndexes,
|
||||
@ -233,7 +231,6 @@ where
|
||||
incremental_snapshot_bank_fields.unwrap_or(full_snapshot_bank_fields),
|
||||
snapshot_accounts_db_fields,
|
||||
genesis_config,
|
||||
frozen_account_pubkeys,
|
||||
account_paths,
|
||||
unpacked_append_vec_map,
|
||||
debug_keys,
|
||||
@ -327,7 +324,6 @@ fn reconstruct_bank_from_fields<E>(
|
||||
bank_fields: BankFieldsToDeserialize,
|
||||
snapshot_accounts_db_fields: SnapshotAccountsDbFields<E>,
|
||||
genesis_config: &GenesisConfig,
|
||||
frozen_account_pubkeys: &[Pubkey],
|
||||
account_paths: &[PathBuf],
|
||||
unpacked_append_vec_map: UnpackedAppendVecMap,
|
||||
debug_keys: Option<Arc<HashSet<Pubkey>>>,
|
||||
@ -343,7 +339,7 @@ fn reconstruct_bank_from_fields<E>(
|
||||
where
|
||||
E: SerializableStorage + std::marker::Sync,
|
||||
{
|
||||
let mut accounts_db = reconstruct_accountsdb_from_fields(
|
||||
let accounts_db = reconstruct_accountsdb_from_fields(
|
||||
snapshot_accounts_db_fields,
|
||||
account_paths,
|
||||
unpacked_append_vec_map,
|
||||
@ -356,10 +352,6 @@ where
|
||||
accounts_db_config,
|
||||
accounts_update_notifier,
|
||||
)?;
|
||||
accounts_db.freeze_accounts(
|
||||
&Ancestors::from(&bank_fields.ancestors),
|
||||
frozen_account_pubkeys,
|
||||
);
|
||||
|
||||
let bank_rc = BankRc::new(Accounts::new_empty(accounts_db), bank_fields.slot);
|
||||
|
||||
|
@ -241,7 +241,6 @@ fn test_bank_serialize_style(serde_style: SerdeStyle) {
|
||||
&dbank_paths,
|
||||
unpacked_append_vec_map,
|
||||
&genesis_config,
|
||||
&[],
|
||||
None,
|
||||
None,
|
||||
AccountSecondaryIndexes::default(),
|
||||
|
@ -721,7 +721,6 @@ const PARALLEL_UNTAR_READERS_DEFAULT: usize = 4;
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn bank_from_snapshot_archives(
|
||||
account_paths: &[PathBuf],
|
||||
frozen_account_pubkeys: &[Pubkey],
|
||||
bank_snapshots_dir: impl AsRef<Path>,
|
||||
full_snapshot_archive_info: &FullSnapshotArchiveInfo,
|
||||
incremental_snapshot_archive_info: Option<&IncrementalSnapshotArchiveInfo>,
|
||||
@ -789,7 +788,6 @@ pub fn bank_from_snapshot_archives(
|
||||
.map(|unarchive_preparation_result| {
|
||||
&unarchive_preparation_result.unpacked_snapshots_dir_and_version
|
||||
}),
|
||||
frozen_account_pubkeys,
|
||||
account_paths,
|
||||
unpacked_append_vec_map,
|
||||
genesis_config,
|
||||
@ -836,7 +834,6 @@ pub fn bank_from_latest_snapshot_archives(
|
||||
bank_snapshots_dir: impl AsRef<Path>,
|
||||
snapshot_archives_dir: impl AsRef<Path>,
|
||||
account_paths: &[PathBuf],
|
||||
frozen_account_pubkeys: &[Pubkey],
|
||||
genesis_config: &GenesisConfig,
|
||||
debug_keys: Option<Arc<HashSet<Pubkey>>>,
|
||||
additional_builtins: Option<&Builtins>,
|
||||
@ -877,7 +874,6 @@ pub fn bank_from_latest_snapshot_archives(
|
||||
|
||||
let (bank, timings) = bank_from_snapshot_archives(
|
||||
account_paths,
|
||||
frozen_account_pubkeys,
|
||||
bank_snapshots_dir.as_ref(),
|
||||
&full_snapshot_archive_info,
|
||||
incremental_snapshot_archive_info.as_ref(),
|
||||
@ -1418,7 +1414,6 @@ fn rebuild_bank_from_snapshots(
|
||||
incremental_snapshot_unpacked_snapshots_dir_and_version: Option<
|
||||
&UnpackedSnapshotsDirAndVersion,
|
||||
>,
|
||||
frozen_account_pubkeys: &[Pubkey],
|
||||
account_paths: &[PathBuf],
|
||||
unpacked_append_vec_map: UnpackedAppendVecMap,
|
||||
genesis_config: &GenesisConfig,
|
||||
@ -1470,7 +1465,6 @@ fn rebuild_bank_from_snapshots(
|
||||
account_paths,
|
||||
unpacked_append_vec_map,
|
||||
genesis_config,
|
||||
frozen_account_pubkeys,
|
||||
debug_keys,
|
||||
additional_builtins,
|
||||
account_secondary_indexes,
|
||||
@ -2638,7 +2632,6 @@ mod tests {
|
||||
|
||||
let (roundtrip_bank, _) = bank_from_snapshot_archives(
|
||||
&[PathBuf::from(accounts_dir.path())],
|
||||
&[],
|
||||
bank_snapshots_dir.path(),
|
||||
&snapshot_archive_info,
|
||||
None,
|
||||
@ -2730,7 +2723,6 @@ mod tests {
|
||||
|
||||
let (roundtrip_bank, _) = bank_from_snapshot_archives(
|
||||
&[PathBuf::from(accounts_dir.path())],
|
||||
&[],
|
||||
bank_snapshots_dir.path(),
|
||||
&full_snapshot_archive_info,
|
||||
None,
|
||||
@ -2841,7 +2833,6 @@ mod tests {
|
||||
|
||||
let (roundtrip_bank, _) = bank_from_snapshot_archives(
|
||||
&[PathBuf::from(accounts_dir.path())],
|
||||
&[],
|
||||
bank_snapshots_dir.path(),
|
||||
&full_snapshot_archive_info,
|
||||
Some(&incremental_snapshot_archive_info),
|
||||
@ -2944,7 +2935,6 @@ mod tests {
|
||||
&bank_snapshots_dir,
|
||||
&snapshot_archives_dir,
|
||||
&[accounts_dir.as_ref().to_path_buf()],
|
||||
&[],
|
||||
&genesis_config,
|
||||
None,
|
||||
None,
|
||||
@ -3004,7 +2994,6 @@ mod tests {
|
||||
let bank0 = Arc::new(Bank::new_with_paths_for_tests(
|
||||
&genesis_config,
|
||||
vec![accounts_dir.path().to_path_buf()],
|
||||
&[],
|
||||
None,
|
||||
None,
|
||||
AccountSecondaryIndexes::default(),
|
||||
@ -3081,7 +3070,6 @@ mod tests {
|
||||
.unwrap();
|
||||
let (deserialized_bank, _) = bank_from_snapshot_archives(
|
||||
&[accounts_dir.path().to_path_buf()],
|
||||
&[],
|
||||
bank_snapshots_dir.path(),
|
||||
&full_snapshot_archive_info,
|
||||
Some(&incremental_snapshot_archive_info),
|
||||
@ -3144,7 +3132,6 @@ mod tests {
|
||||
|
||||
let (deserialized_bank, _) = bank_from_snapshot_archives(
|
||||
&[accounts_dir.path().to_path_buf()],
|
||||
&[],
|
||||
bank_snapshots_dir.path(),
|
||||
&full_snapshot_archive_info,
|
||||
Some(&incremental_snapshot_archive_info),
|
||||
|
Reference in New Issue
Block a user