From 24fab0d12e9c2444599549c80f33df385637fede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 7 Dec 2023 12:25:21 +0200 Subject: [PATCH] core/state: auto-finalise state objects during copy --- core/state/statedb.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/state/statedb.go b/core/state/statedb.go index 905944cbb5..2c5781f75e 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -723,6 +723,7 @@ func (s *StateDB) Copy() *StateDB { // so we need to make sure that any side-effect the journal would have caused // during a commit (or similar op) is already applied to the copy. state.stateObjects[addr] = object.deepCopy(state) + state.stateObjects[addr].finalise(true) state.stateObjectsDirty[addr] = struct{}{} // Mark the copy dirty to force internal (code/state) commits state.stateObjectsPending[addr] = struct{}{} // Mark the copy pending to force external (account) commits