Skip to content

Commit

Permalink
catalyst: runs every transaction in a snapshot in assembleBlock handl…
Browse files Browse the repository at this point in the history
…er (#7) (ethereum#22989)

Co-authored-by: Gary Rong <[email protected]>
Co-authored-by: Mikhail Kalinin <[email protected]>
  • Loading branch information
rjl493456442 and mkalinin authored Jun 3, 2021
1 parent 216ed05 commit 3094e7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eth/catalyst/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3094e7f

Please sign in to comment.