mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
miner: fix nil statedb panic in applyTransaction pre-amsterdam
When accessList is nil (pre-Amsterdam blocks), stateCopy is never assigned and passed as nil to core.ApplyTransaction. This causes a nil pointer dereference at state_processor.go:224 when checking statedb.Database().TrieDB().IsVerkle(). Set stateCopy = env.state in the non-Amsterdam path so ApplyTransaction always receives a valid statedb. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3e27b31d45
commit
232bedfb31
1 changed files with 2 additions and 0 deletions
|
|
@ -438,6 +438,8 @@ func (miner *Miner) applyTransaction(env *environment, tx *types.Transaction) (*
|
|||
prevReader = env.state.Reader()
|
||||
stateCopy = env.state.WithReader(state.NewReaderWithTracker(env.state.Reader()))
|
||||
env.evm.StateDB = stateCopy
|
||||
} else {
|
||||
stateCopy = env.state
|
||||
}
|
||||
|
||||
mutations, receipt, err := core.ApplyTransaction(env.evm, env.gasPool, stateCopy, env.header, tx)
|
||||
|
|
|
|||
Loading…
Reference in a new issue