Merge branch 'ethereum:master' into master

This commit is contained in:
Bastien 2022-02-08 11:42:15 +01:00 committed by GitHub
commit 453da32a44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1134,6 +1134,9 @@ func (w *worker) commit(env *environment, interval func(), update bool, start ti
if interval != nil {
interval()
}
// Create a local environment copy, avoid the data race with snapshot state.
// https://github.com/ethereum/go-ethereum/issues/24299
env := env.copy()
block, err := w.engine.FinalizeAndAssemble(w.chain, env.header, env.state, env.txs, env.unclelist(), env.receipts)
if err != nil {
return err