Skip to content

Commit 5984d19

Browse files
authored
Logs lt hash checksums if the feature is off but the cli arg is on (#3615)
1 parent 7585e9b commit 5984d19

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

runtime/src/bank/accounts_lt_hash.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ impl Bank {
4242
let delta_lt_hash = self.calculate_delta_lt_hash();
4343
let mut accounts_lt_hash = self.accounts_lt_hash.lock().unwrap();
4444
accounts_lt_hash.0.mix_in(&delta_lt_hash);
45+
46+
// If the feature gate is not yet active, log the lt hash checksums for debug/testing
47+
if !self
48+
.feature_set
49+
.is_active(&feature_set::accounts_lt_hash::id())
50+
{
51+
log::info!(
52+
"updated accounts lattice hash for slot {}, delta_lt_hash checksum: {}, accounts_lt_hash checksum: {}",
53+
self.slot(),
54+
delta_lt_hash.checksum(),
55+
accounts_lt_hash.0.checksum(),
56+
);
57+
}
4558
}
4659

4760
/// Calculates the lt hash *of only this slot*

0 commit comments

Comments
 (0)