test_clean_zero_lamport_and_old_roots uses write cache (#29113)
This commit is contained in:
parent
18a85edf8c
commit
00f5a176a0
|
@ -11764,7 +11764,8 @@ pub mod tests {
|
|||
fn test_clean_zero_lamport_and_old_roots() {
|
||||
solana_logger::setup();
|
||||
|
||||
let accounts = AccountsDb::new(Vec::new(), &ClusterType::Development);
|
||||
let mut accounts = AccountsDb::new(Vec::new(), &ClusterType::Development);
|
||||
accounts.caching_enabled = true;
|
||||
let pubkey = solana_sdk::pubkey::new_rand();
|
||||
let account = AccountSharedData::new(1, 0, AccountSharedData::default().owner());
|
||||
let zero_lamport_account =
|
||||
|
@ -11776,8 +11777,10 @@ pub mod tests {
|
|||
|
||||
// Simulate rooting the zero-lamport account, should be a
|
||||
// candidate for cleaning
|
||||
accounts.add_root(0);
|
||||
accounts.add_root(1);
|
||||
accounts.get_accounts_delta_hash(0);
|
||||
accounts.add_root_and_flush_write_cache(0);
|
||||
accounts.get_accounts_delta_hash(1);
|
||||
accounts.add_root_and_flush_write_cache(1);
|
||||
|
||||
// Slot 0 should be removed, and
|
||||
// zero-lamport account should be cleaned
|
||||
|
|
Loading…
Reference in New Issue