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 fun4square committed Oct 22, 2021
1 parent 568b65b commit 57c4017
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 @@ -1294,6 +1294,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 57c4017

Please sign in to comment.