mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
tracers/prestate: always remove empty accounts from pre-state
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
This commit is contained in:
parent
c4f0450710
commit
6e813f68ba
1 changed files with 3 additions and 5 deletions
|
|
@ -177,11 +177,9 @@ func (t *prestateTracer) OnTxEnd(receipt *types.Receipt, err error) {
|
|||
if t.config.DiffMode {
|
||||
t.processDiffState()
|
||||
}
|
||||
// the new created contracts' prestate were empty, so delete them
|
||||
for a := range t.created {
|
||||
// the created contract maybe exists in statedb before the creating tx
|
||||
if s := t.pre[a]; s != nil && s.empty {
|
||||
delete(t.pre, a)
|
||||
for addr, s := range t.pre {
|
||||
if s.empty {
|
||||
delete(t.pre, addr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue