Skip to content

Commit

Permalink
only discard a transaction if the batch is completely empty (#1431)
Browse files Browse the repository at this point in the history
blocks take up counters so this tx might be valid at the start of the very next batch
  • Loading branch information
hexoscott authored Nov 8, 2024
1 parent effcd23 commit 48f7026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zk/stages/stage_sequence_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ func sequencingBatchStep(
In this case we make note that we have had a transaction that overflowed and continue attempting to process transactions
Once we reach the cap for these attempts we will stop producing blocks and consider the batch done
*/
if !batchState.hasAnyTransactionsInThisBatch {
if !batchState.hasAnyTransactionsInThisBatch && len(batchState.builtBlocks) == 0 {
// mark the transaction to be removed from the pool
cfg.txPool.MarkForDiscardFromPendingBest(txHash)
log.Info(fmt.Sprintf("[%s] single transaction %s cannot fit into batch", logPrefix, txHash))
Expand Down

0 comments on commit 48f7026

Please sign in to comment.