use slots returned from get_snapshot_storages to sort (#17638)

* use slots returned from get_snapshot_storages to sort

* add tests
This commit is contained in:
Jeff Washington (jwash)
2021-06-02 18:24:55 -05:00
committed by GitHub
parent 4bd32d891f
commit 9388aaca15
3 changed files with 126 additions and 45 deletions

View File

@@ -11,6 +11,7 @@ use {
snapshot_package::{
AccountsPackage, AccountsPackagePre, AccountsPackageSendError, AccountsPackageSender,
},
sorted_storages::SortedStorages,
},
bincode::{config::Options, serialize_into},
bzip2::bufread::BzDecoder,
@@ -999,8 +1000,9 @@ pub fn process_accounts_package_pre(
let hash = accounts_package.hash; // temporarily remaining here
if let Some(expected_hash) = accounts_package.hash_for_testing {
let sorted_storages = SortedStorages::new(&accounts_package.storages);
let (hash, lamports) = AccountsDb::calculate_accounts_hash_without_index(
&accounts_package.storages,
&sorted_storages,
thread_pool,
crate::accounts_hash::HashStats::default(),
false,