Skip to content

Commit

Permalink
Fixup log of Epoch Accounts Hash when freezing bank (#27688)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Sep 9, 2022
1 parent 080f085 commit fc396f9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6837,7 +6837,8 @@ impl Bank {
]);

let epoch_accounts_hash = self.epoch_accounts_hash();
if self.should_include_epoch_accounts_hash() {
let should_include_epoch_accounts_hash = self.should_include_epoch_accounts_hash();
if should_include_epoch_accounts_hash {
// Nothing is writing a value into the epoch accounts hash yet—this is not a problem
// for normal clusters, as the feature gating this `if` block is always false.
// However, some tests enable all features, so this `if` block can be true.
Expand Down Expand Up @@ -6876,10 +6877,11 @@ impl Bank {
self.signature_count(),
self.last_blockhash(),
self.capitalization(),
match epoch_accounts_hash {
None => "".to_string(),
Some(epoch_accounts_hash) => format!(", epoch_accounts_hash: {}", epoch_accounts_hash.as_ref()),
},
if should_include_epoch_accounts_hash {
format!(", epoch_accounts_hash: {:?}", epoch_accounts_hash)
} else {
"".to_string()
}
);

info!(
Expand Down

0 comments on commit fc396f9

Please sign in to comment.