Skip to content

Commit

Permalink
Runs every transaction in a snapshot in assembleBlock handler (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalinin authored and gballet committed Jun 3, 2021
1 parent 216ed05 commit a4ecb0c
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 a4ecb0c

Please sign in to comment.