mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16:44 +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 {
|
if t.config.DiffMode {
|
||||||
t.processDiffState()
|
t.processDiffState()
|
||||||
}
|
}
|
||||||
// the new created contracts' prestate were empty, so delete them
|
for addr, s := range t.pre {
|
||||||
for a := range t.created {
|
if s.empty {
|
||||||
// the created contract maybe exists in statedb before the creating tx
|
delete(t.pre, addr)
|
||||||
if s := t.pre[a]; s != nil && s.empty {
|
|
||||||
delete(t.pre, a)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue