Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Discard bundles with reverting txs
Browse files Browse the repository at this point in the history
  • Loading branch information
jparyani authored and chpiatt committed Aug 24, 2021
1 parent 131e149 commit e2eb729
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 @@ -1284,6 +1284,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 e2eb729

Please sign in to comment.