Check account hashes in snapshot (#7559)

* Check for incorrect hash value

* Finish up checking for incorrect hash value

* Fix comment a bit

Co-authored-by: sakridge <sakridge@gmail.com>
This commit is contained in:
Ryo Onodera
2019-12-20 09:39:30 +09:00
committed by GitHub
parent 37eaa6e4f9
commit 3c361eb759
5 changed files with 136 additions and 34 deletions

View File

@ -59,12 +59,12 @@ fn test_accounts_squash(bencher: &mut Bencher) {
}
#[bench]
fn test_accounts_hash_internal_state(bencher: &mut Bencher) {
fn test_accounts_hash_bank_hash(bencher: &mut Bencher) {
let accounts = Accounts::new(vec![PathBuf::from("bench_accounts_hash_internal")]);
let mut pubkeys: Vec<Pubkey> = vec![];
create_test_accounts(&accounts, &mut pubkeys, 60000, 0);
let ancestors = vec![(0, 0)].into_iter().collect();
bencher.iter(|| {
accounts.verify_hash_internal_state(0, &ancestors);
accounts.verify_bank_hash(0, &ancestors);
});
}