From 5e2b9e595d9662bd5659de96534dc6600fc97389 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 9 Feb 2021 18:02:23 +0000 Subject: [PATCH] use index version of calculating hash (#15189) (#15211) * use index version of calculating hash * invert const * formatting (cherry picked from commit 8424fe2c12875612e5bd22a1c238b07b753aac7d) Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com> --- runtime/src/accounts_background_service.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/src/accounts_background_service.rs b/runtime/src/accounts_background_service.rs index 775762a812..13eabeb645 100644 --- a/runtime/src/accounts_background_service.rs +++ b/runtime/src/accounts_background_service.rs @@ -122,8 +122,9 @@ impl SnapshotRequestHandler { let mut hash_time = Measure::start("hash_time"); let mut hash_for_testing = None; + const USE_INDEX: bool = true; snapshot_root_bank - .update_accounts_hash_with_index_option(true, test_hash_calculation); + .update_accounts_hash_with_index_option(!USE_INDEX, test_hash_calculation); if test_hash_calculation { hash_for_testing = Some(snapshot_root_bank.get_accounts_hash()); }