Patch for concurrent iterator & others (onto v1.11.6) #386

Closed
roysc wants to merge 1565 commits from v1.11.6-statediff-v5 into master
Showing only changes of commit 3094e7f3b8 - Show all commits

View File

@ -79,8 +79,10 @@ type blockExecutionEnv struct {
func (env *blockExecutionEnv) commitTransaction(tx *types.Transaction, coinbase common.Address) error { func (env *blockExecutionEnv) commitTransaction(tx *types.Transaction, coinbase common.Address) error {
vmconfig := *env.chain.GetVMConfig() vmconfig := *env.chain.GetVMConfig()
snap := env.state.Snapshot()
receipt, err := core.ApplyTransaction(env.chain.Config(), env.chain, &coinbase, env.gasPool, env.state, env.header, tx, &env.header.GasUsed, vmconfig) receipt, err := core.ApplyTransaction(env.chain.Config(), env.chain, &coinbase, env.gasPool, env.state, env.header, tx, &env.header.GasUsed, vmconfig)
if err != nil { if err != nil {
env.state.RevertToSnapshot(snap)
return err return err
} }
env.txs = append(env.txs, tx) env.txs = append(env.txs, tx)