From 9e7208e0d85f3f2f8159fb0cade69e47d33f52f5 Mon Sep 17 00:00:00 2001 From: maskpp Date: Tue, 22 Oct 2024 18:04:23 +0800 Subject: [PATCH] handle possible bug --- miner/taiko_worker.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/miner/taiko_worker.go b/miner/taiko_worker.go index 1224cca8f662..3d0ba40f98f9 100644 --- a/miner/taiko_worker.go +++ b/miner/taiko_worker.go @@ -294,10 +294,6 @@ loop: txs.Shift() case errors.Is(err, nil): - // Everything ok, collect the logs and shift in the next transaction from the same account - env.tcount++ - txs.Shift() - data, err := rlp.EncodeToBytes(env.txs) if err != nil { log.Trace("Failed to rlp encode the pending transaction %s: %w", tx.Hash(), err) @@ -321,6 +317,10 @@ loop: } } + // Everything ok, collect the logs and shift in the next transaction from the same account + env.tcount++ + txs.Shift() + default: // Transaction is regarded as invalid, drop all consecutive transactions from // the same sender because of `nonce-too-high` clause.