Skip to content

Commit

Permalink
fix: fix handle status
Browse files Browse the repository at this point in the history
  • Loading branch information
Lredhdx committed Dec 31, 2024
1 parent d4c6fef commit 41fb2c1
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions miner/worker_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,18 +399,20 @@ func (w *worker) simulateBundle(

if receipt.Status == types.ReceiptStatusFailed && !containsHash(bundle.RevertingTxHashes, receipt.TxHash) {
// for unRevertible tx but itself can be dropped, we drop it and revert the state and gas pool
if !containsHash(bundle.DroppingTxHashes, receipt.TxHash) {
err = errNonRevertingTxInBundleFailed
log.Warn("fail to simulate bundle", "hash", bundle.Hash().String(), "err", err)

if prune {
w.eth.TxPool().PruneBundle(bundle.Hash())
log.Warn("prune bundle", "hash", bundle.Hash().String())
}
if containsHash(bundle.DroppingTxHashes, receipt.TxHash) {
log.Warn("drop tx in bundle", "hash", receipt.TxHash.String())
gasPool.SetGas(gp)
continue
}
err = errNonRevertingTxInBundleFailed
log.Warn("fail to simulate bundle", "hash", bundle.Hash().String(), "err", err)

return nil, err
if prune {
w.eth.TxPool().PruneBundle(bundle.Hash())
log.Warn("prune bundle", "hash", bundle.Hash().String())
}
log.Warn("drop tx in bundle", "hash", receipt.TxHash.String())

return nil, err
}
if !w.eth.TxPool().Has(tx.Hash()) {
bundleGasUsed += receipt.GasUsed
Expand Down

0 comments on commit 41fb2c1

Please sign in to comment.