eth/tracers: including the cleared storage slot in post state

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2024-11-22 10:48:57 +08:00
parent e3d61e6db0
commit 1f21652e28
1 changed files with 2 additions and 4 deletions

View File

@ -238,13 +238,11 @@ func (t *prestateTracer) processDiffState() {
newVal := t.env.StateDB.GetState(addr, key)
if val == newVal {
// Omit unchanged slots
// omit unchanged slots
delete(t.pre[addr].Storage, key)
} else {
modified = true
if newVal != (common.Hash{}) {
postAccount.Storage[key] = newVal
}
postAccount.Storage[key] = newVal
}
}
}