Skip to content

Commit

Permalink
Log more info when capitalization mismatches (#1927)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Jun 29, 2024
1 parent 361ade4 commit 9fa7a2c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/src/accounts_hash_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,20 +337,22 @@ impl AccountsHashVerifier {
store_detailed_debug_info_on_failure: true,
..calculate_accounts_hash_config
};
_ = accounts_package
let second_accounts_hash = accounts_package
.accounts
.accounts_db
.calculate_accounts_hash(
&calculate_accounts_hash_config,
&sorted_storages,
HashStats::default(),
);
panic!(
"accounts hash capitalization mismatch: expected {}, but calculated {} (then recalculated {})",
accounts_package.expected_capitalization,
lamports,
second_accounts_hash.1,
);
}

assert_eq!(
accounts_package.expected_capitalization, lamports,
"accounts hash capitalization mismatch"
);
if let Some(expected_hash) = accounts_package.accounts_hash_for_testing {
assert_eq!(expected_hash, accounts_hash);
};
Expand Down

0 comments on commit 9fa7a2c

Please sign in to comment.