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 Jul 22, 2021
1 parent cf258d6 commit f621585
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 @@ -1286,6 +1286,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 f621585

Please sign in to comment.