From 25219136548c0192790e26463a76fc277a1a7cd9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2020 09:57:38 -0700 Subject: [PATCH] Add counter for accounts hash verification. (#8928) (#8934) automerge --- core/src/accounts_hash_verifier.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/accounts_hash_verifier.rs b/core/src/accounts_hash_verifier.rs index 7824d4d414..ee2df9eb84 100644 --- a/core/src/accounts_hash_verifier.rs +++ b/core/src/accounts_hash_verifier.rs @@ -118,6 +118,7 @@ impl AccountsHashVerifier { trusted_validators: &Option>, slot_to_hash: &mut HashMap, ) -> bool { + let mut verified_count = 0; if let Some(trusted_validators) = trusted_validators.as_ref() { for trusted_validator in trusted_validators { let cluster_info_r = cluster_info.read().unwrap(); @@ -135,6 +136,8 @@ impl AccountsHashVerifier { ); return true; + } else { + verified_count += 1; } } else { slot_to_hash.insert(*slot, *hash); @@ -143,6 +146,7 @@ impl AccountsHashVerifier { } } } + inc_new_counter_info!("accounts_hash_verifier-hashes_verified", verified_count); false }