Simplifies AHV's `test_max_hashes()` (#28754)

This commit is contained in:
Brooks Prumo 2022-11-07 02:32:33 +00:00 committed by GitHub
parent 0bc66c82aa
commit 0b9426e734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -535,14 +535,12 @@ mod tests {
incremental_snapshot_archive_interval_slots: Slot::MAX,
..SnapshotConfig::default()
};
let accounts = Arc::new(solana_runtime::accounts::Accounts::default_for_tests());
let expected_hash = Hash::from_str("GKot5hBsd81kMupNCXHaqbhv3huEbxAFMLnpcX2hniwn").unwrap();
for i in 0..MAX_SNAPSHOT_HASHES + 1 {
let slot = full_snapshot_archive_interval_slots + i as u64;
let accounts_package = AccountsPackage {
package_type: AccountsPackageType::AccountsHashVerifier,
slot: full_snapshot_archive_interval_slots + i as u64,
block_height: full_snapshot_archive_interval_slots + i as u64,
accounts: Arc::clone(&accounts),
slot,
block_height: slot,
..AccountsPackage::default_for_tests()
};
@ -558,7 +556,7 @@ mod tests {
Some(&snapshot_config),
);
// sleep for 1ms to create a newer timestmap for gossip entry
// sleep for 1ms to create a newer timestamp for gossip entry
// otherwise the timestamp won't be newer.
std::thread::sleep(Duration::from_millis(1));
}