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 May 13, 2021
1 parent fabb91e commit f933b03
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 f933b03

Please sign in to comment.