mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/state: auto-finalise state objects during copy
This commit is contained in:
parent
a113497dd7
commit
24fab0d12e
1 changed files with 1 additions and 0 deletions
|
|
@ -723,6 +723,7 @@ func (s *StateDB) Copy() *StateDB {
|
||||||
// so we need to make sure that any side-effect the journal would have caused
|
// 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.
|
// during a commit (or similar op) is already applied to the copy.
|
||||||
state.stateObjects[addr] = object.deepCopy(state)
|
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.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
|
state.stateObjectsPending[addr] = struct{}{} // Mark the copy pending to force external (account) commits
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue