Skip to content

Commit

Permalink
Discard bundles with reverting txs
Browse files Browse the repository at this point in the history
  • Loading branch information
jparyani committed Apr 12, 2021
1 parent 910d412 commit df05284
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,10 @@ func (w *worker) computeBundleGas(bundle types.Transactions, parent *types.Block
if err != nil {
return nil, 0, err
}
if receipt.Status == types.ReceiptStatusFailed {
return nil, 0, errors.New("revert")
}

totalGasUsed += receipt.GasUsed
gasFees.Add(gasFees, new(big.Int).Mul(big.NewInt(int64(totalGasUsed)), tx.GasPrice()))
}
Expand Down

0 comments on commit df05284

Please sign in to comment.