Unverified Commit 3094e7f3 authored by gary rong's avatar gary rong Committed by GitHub

catalyst: runs every transaction in a snapshot in assembleBlock handler (#7) (#22989)

Co-authored-by: 's avatarGary Rong <garyrong0905@gmail.com>
Co-authored-by: 's avatarMikhail Kalinin <noblesse.knight@gmail.com>
parent 216ed05c
......@@ -79,8 +79,10 @@ type blockExecutionEnv struct {
func (env *blockExecutionEnv) commitTransaction(tx *types.Transaction, coinbase common.Address) error {
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)
if err != nil {
env.state.RevertToSnapshot(snap)
return err
}
env.txs = append(env.txs, tx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment