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 27, 2024
1 parent 3fdd424 commit d4c6fef
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions miner/worker_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,22 +399,18 @@ 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) {
log.Warn("drop tx in bundle", "hash", receipt.TxHash.String())
gasPool.SetGas(gp)
succeedTxs = append(succeedTxs, tx)
succeedTxCount++
continue
}
err = errNonRevertingTxInBundleFailed
log.Warn("fail to simulate bundle", "hash", bundle.Hash().String(), "err", err)
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 prune {
w.eth.TxPool().PruneBundle(bundle.Hash())
log.Warn("prune bundle", "hash", bundle.Hash().String())
}

return nil, err
return nil, err
}
log.Warn("drop tx in bundle", "hash", receipt.TxHash.String())
}
if !w.eth.TxPool().Has(tx.Hash()) {
bundleGasUsed += receipt.GasUsed
Expand Down

0 comments on commit d4c6fef

Please sign in to comment.