@@ -4924,7 +4924,7 @@ impl AccountsDb {
4924
4924
& self ,
4925
4925
slot : Slot ,
4926
4926
cache_map_func : impl Fn ( & LoadedAccount ) -> Option < R > + Sync ,
4927
- storage_scan_func : impl Fn ( & B , & LoadedAccount , Option < & [ u8 ] > ) + Sync ,
4927
+ storage_scan_func : impl Fn ( & mut B , & LoadedAccount , Option < & [ u8 ] > ) + Sync ,
4928
4928
scan_account_storage_data : ScanAccountStorageData ,
4929
4929
) -> ScanStorageResult < R , B >
4930
4930
where
@@ -4946,7 +4946,7 @@ impl AccountsDb {
4946
4946
& self ,
4947
4947
slot : Slot ,
4948
4948
cache_map_func : impl Fn ( & LoadedAccount ) -> Option < R > + Sync ,
4949
- storage_fallback_func : impl Fn ( & B , & AccountsFile ) + Sync ,
4949
+ storage_fallback_func : impl Fn ( & mut B , & AccountsFile ) + Sync ,
4950
4950
) -> ScanStorageResult < R , B >
4951
4951
where
4952
4952
R : Send ,
@@ -4979,7 +4979,7 @@ impl AccountsDb {
4979
4979
)
4980
4980
}
4981
4981
} else {
4982
- let retval = B :: default ( ) ;
4982
+ let mut retval = B :: default ( ) ;
4983
4983
// If the slot is not in the cache, then all the account information must have
4984
4984
// been flushed. This is guaranteed because we only remove the rooted slot from
4985
4985
// the cache *after* we've finished flushing in `flush_slot_cache`.
@@ -4996,7 +4996,7 @@ impl AccountsDb {
4996
4996
. storage
4997
4997
. get_slot_storage_entry_shrinking_in_progress_ok ( slot)
4998
4998
{
4999
- storage_fallback_func ( & retval, & storage. accounts ) ;
4999
+ storage_fallback_func ( & mut retval, & storage. accounts ) ;
5000
5000
}
5001
5001
5002
5002
ScanStorageResult :: Stored ( retval)
@@ -7472,7 +7472,7 @@ impl AccountsDb {
7472
7472
let scan_result = self . scan_cache_storage_fallback (
7473
7473
slot,
7474
7474
|loaded_account| Some ( * loaded_account. pubkey ( ) ) ,
7475
- |accum : & DashSet < Pubkey > , storage| {
7475
+ |accum : & mut HashSet < Pubkey > , storage| {
7476
7476
storage. scan_pubkeys ( |pubkey| {
7477
7477
accum. insert ( * pubkey) ;
7478
7478
} ) ;
@@ -7492,14 +7492,16 @@ impl AccountsDb {
7492
7492
slot : Slot ,
7493
7493
) -> ( Vec < ( Pubkey , AccountHash ) > , u64 , Measure ) {
7494
7494
let mut scan = Measure :: start ( "scan" ) ;
7495
- let scan_result: ScanStorageResult < ( Pubkey , AccountHash ) , DashMap < Pubkey , AccountHash > > =
7495
+ let scan_result: ScanStorageResult < ( Pubkey , AccountHash ) , HashMap < Pubkey , AccountHash > > =
7496
7496
self . scan_account_storage (
7497
7497
slot,
7498
7498
|loaded_account : & LoadedAccount | {
7499
7499
// Cache only has one version per key, don't need to worry about versioning
7500
7500
Some ( ( * loaded_account. pubkey ( ) , loaded_account. loaded_hash ( ) ) )
7501
7501
} ,
7502
- |accum : & DashMap < Pubkey , AccountHash > , loaded_account : & LoadedAccount , _data| {
7502
+ |accum : & mut HashMap < Pubkey , AccountHash > ,
7503
+ loaded_account : & LoadedAccount ,
7504
+ _data| {
7503
7505
let mut loaded_hash = loaded_account. loaded_hash ( ) ;
7504
7506
if loaded_hash == AccountHash ( Hash :: default ( ) ) {
7505
7507
loaded_hash = Self :: hash_account ( loaded_account, loaded_account. pubkey ( ) )
@@ -7527,7 +7529,7 @@ impl AccountsDb {
7527
7529
// Cache only has one version per key, don't need to worry about versioning
7528
7530
Some ( ( * loaded_account. pubkey ( ) , loaded_account. take_account ( ) ) )
7529
7531
} ,
7530
- |accum : & DashMap < _ , _ > , loaded_account, _data| {
7532
+ |accum : & mut HashMap < _ , _ > , loaded_account, _data| {
7531
7533
// Storage may have duplicates so only keep the latest version for each key
7532
7534
accum. insert ( * loaded_account. pubkey ( ) , loaded_account. take_account ( ) ) ;
7533
7535
} ,
@@ -7543,7 +7545,7 @@ impl AccountsDb {
7543
7545
/// Return all of the accounts for a given slot
7544
7546
pub fn get_pubkey_hash_account_for_slot ( & self , slot : Slot ) -> Vec < PubkeyHashAccount > {
7545
7547
type ScanResult =
7546
- ScanStorageResult < PubkeyHashAccount , DashMap < Pubkey , ( AccountHash , AccountSharedData ) > > ;
7548
+ ScanStorageResult < PubkeyHashAccount , HashMap < Pubkey , ( AccountHash , AccountSharedData ) > > ;
7547
7549
let scan_result: ScanResult = self . scan_account_storage (
7548
7550
slot,
7549
7551
|loaded_account : & LoadedAccount | {
@@ -7554,7 +7556,7 @@ impl AccountsDb {
7554
7556
account : loaded_account. take_account ( ) ,
7555
7557
} )
7556
7558
} ,
7557
- |accum : & DashMap < Pubkey , ( AccountHash , AccountSharedData ) > ,
7559
+ |accum : & mut HashMap < Pubkey , ( AccountHash , AccountSharedData ) > ,
7558
7560
loaded_account : & LoadedAccount ,
7559
7561
_data| {
7560
7562
// Storage may have duplicates so only keep the latest version for each key
0 commit comments