core/state: avoid unnecessary conversions #19870 (#1188)

This commit is contained in:
Daniel Liu 2025-07-11 09:42:20 +08:00 committed by GitHub
parent 220b2f4174
commit 16638e9e17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,15 +85,15 @@ func TestIntermediateLeaks(t *testing.T) {
// Modify the transient state.
for i := byte(0); i < 255; i++ {
modify(transState, common.Address{byte(i)}, i, 0)
modify(transState, common.Address{i}, i, 0)
}
// Write modifications to trie.
transState.IntermediateRoot(false)
// Overwrite all the data with new values in the transient database.
for i := byte(0); i < 255; i++ {
modify(transState, common.Address{byte(i)}, i, 99)
modify(finalState, common.Address{byte(i)}, i, 99)
modify(transState, common.Address{i}, i, 99)
modify(finalState, common.Address{i}, i, 99)
}
// Commit and cross check the databases.