Fix rooted accounts cleanup, simplify locking (#12194)

Co-authored-by: Carl Lin <carl@solana.com>
This commit is contained in:
carllin
2020-09-28 16:04:46 -07:00
committed by GitHub
parent 35208c5ee7
commit 06f84c65f1
18 changed files with 758 additions and 399 deletions

View File

@ -1073,7 +1073,7 @@ mod tests {
.transfer_and_confirm(50, &alice_keypair, &Pubkey::new_rand())
.unwrap();
// super fun time; callback chooses to .clean_accounts() or not
// super fun time; callback chooses to .clean_accounts(None) or not
callback(&*bank);
// create a normal account at the same pubkey as the zero-lamports account
@ -1091,7 +1091,7 @@ mod tests {
bank.squash();
// do clean and assert that it actually did its job
assert_eq!(3, bank.get_snapshot_storages().len());
bank.clean_accounts();
bank.clean_accounts(false);
assert_eq!(2, bank.get_snapshot_storages().len());
});
}