fix indentation format problem (#15618)

* fix indentation format problem

* fix indentation format problem
This commit is contained in:
Jeff Washington (jwash)
2021-03-02 10:46:00 -06:00
committed by GitHub
parent aad79d9d5c
commit da47ab7e50

View File

@ -3499,8 +3499,7 @@ impl AccountsDb {
keys.par_chunks(chunks) keys.par_chunks(chunks)
.map(|pubkeys| { .map(|pubkeys| {
let mut sum = 0u128; let mut sum = 0u128;
let result: Vec<Hash> = let result: Vec<Hash> = pubkeys
pubkeys
.iter() .iter()
.filter_map(|pubkey| { .filter_map(|pubkey| {
if let Some((lock, index)) = if let Some((lock, index)) =
@ -3515,9 +3514,11 @@ impl AccountsDb {
account_info.offset, account_info.offset,
) )
.get_loaded_account() .get_loaded_account()
.and_then(|loaded_account| { .and_then(
|loaded_account| {
let loaded_hash = loaded_account.loaded_hash(); let loaded_hash = loaded_account.loaded_hash();
let balance = Self::account_balance_for_capitalization( let balance =
Self::account_balance_for_capitalization(
account_info.lamports, account_info.lamports,
loaded_account.owner(), loaded_account.owner(),
loaded_account.executable(), loaded_account.executable(),
@ -3525,7 +3526,8 @@ impl AccountsDb {
); );
if check_hash { if check_hash {
let computed_hash = loaded_account.compute_hash( let computed_hash = loaded_account
.compute_hash(
*slot, *slot,
&self.cluster_type.expect( &self.cluster_type.expect(
"Cluster type must be set at initialization", "Cluster type must be set at initialization",
@ -3533,14 +3535,16 @@ impl AccountsDb {
pubkey, pubkey,
); );
if computed_hash != *loaded_hash { if computed_hash != *loaded_hash {
mismatch_found.fetch_add(1, Ordering::Relaxed); mismatch_found
.fetch_add(1, Ordering::Relaxed);
return None; return None;
} }
} }
sum += balance as u128; sum += balance as u128;
Some(*loaded_hash) Some(*loaded_hash)
}) },
)
} else { } else {
None None
} }