mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-18 05:56:37 +00:00
clarify case about selfdestructing initcode
This commit is contained in:
parent
58eac317b1
commit
77a98936ed
1 changed files with 1 additions and 3 deletions
|
|
@ -315,9 +315,7 @@ func (s *hookedStateDB) Finalise(deleteEmptyObjects bool) {
|
||||||
prevCodeHash := s.inner.GetCodeHash(addr)
|
prevCodeHash := s.inner.GetCodeHash(addr)
|
||||||
prevCode := s.inner.GetCode(addr)
|
prevCode := s.inner.GetCode(addr)
|
||||||
|
|
||||||
// don't record a code change if its a selfdestructing initcode
|
// if an initcode invokes selfdestruct, do not emit a code change.
|
||||||
// ^ TODO: I assume that this is the only case where this can occur but should double-check
|
|
||||||
// just to be totally sure
|
|
||||||
if prevCodeHash == types.EmptyCodeHash {
|
if prevCodeHash == types.EmptyCodeHash {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue