From f87eb3127ab5469af9137079fd191f2d4a5f4e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Garamv=C3=B6lgyi?= Date: Thu, 3 Aug 2023 16:45:45 +0200 Subject: [PATCH] fix: do not reuse same snapshot twice (#435) fix: create new snapshot --- miner/worker.go | 2 ++ params/version.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/miner/worker.go b/miner/worker.go index 6329110be1..285c42cb65 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -853,6 +853,8 @@ func (w *worker) commitTransaction(tx *types.Transaction, coinbase common.Addres // revert to snapshot for calling `core.ApplyMessage` again, (both `traceEnv.GetBlockTrace` & `core.ApplyTransaction` will call `core.ApplyMessage`) w.current.state.RevertToSnapshot(snap) + // create new snapshot for `core.ApplyTransaction` + snap = w.current.state.Snapshot() receipt, err := core.ApplyTransaction(w.chainConfig, w.chain, &coinbase, w.current.gasPool, w.current.state, w.current.header, tx, &w.current.header.GasUsed, *w.chain.GetVMConfig()) if err != nil { w.current.state.RevertToSnapshot(snap) diff --git a/params/version.go b/params/version.go index da335508ae..aa64a808f3 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 4 // Major version component of the current release VersionMinor = 3 // Minor version component of the current release - VersionPatch = 15 // Patch version component of the current release + VersionPatch = 16 // Patch version component of the current release VersionMeta = "sepolia" // Version metadata to append to the version string )