From 77a98936ed3683ceb115eca46041d2799d7c04e4 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Tue, 14 Oct 2025 12:08:19 +0800 Subject: [PATCH] clarify case about selfdestructing initcode --- core/state/statedb_hooked.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/state/statedb_hooked.go b/core/state/statedb_hooked.go index 205acb41da..264dbeec82 100644 --- a/core/state/statedb_hooked.go +++ b/core/state/statedb_hooked.go @@ -315,9 +315,7 @@ func (s *hookedStateDB) Finalise(deleteEmptyObjects bool) { prevCodeHash := s.inner.GetCodeHash(addr) prevCode := s.inner.GetCode(addr) - // don't record a code change if its a selfdestructing initcode - // ^ TODO: I assume that this is the only case where this can occur but should double-check - // just to be totally sure + // if an initcode invokes selfdestruct, do not emit a code change. if prevCodeHash == types.EmptyCodeHash { continue }