From ee20ddbb8214d732291fa69e5914a8c85f9ced9b Mon Sep 17 00:00:00 2001 From: Kyrin Date: Tue, 21 Oct 2025 12:19:22 +0800 Subject: [PATCH] Let recheck work while journal path is empty and fix TestResubmit --- core/txpool/locals/tx_tracker.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/txpool/locals/tx_tracker.go b/core/txpool/locals/tx_tracker.go index 5834aa122a..bb178f175e 100644 --- a/core/txpool/locals/tx_tracker.go +++ b/core/txpool/locals/tx_tracker.go @@ -157,8 +157,10 @@ func (tracker *TxTracker) recheck(journalCheck bool) []*types.Transaction { // Rejournal the tracker while holding the lock. No new transactions will // be added to the old journal during this period, preventing any potential // transaction loss. - if err := tracker.journal.rotate(rejournal); err != nil { - log.Warn("Transaction journal rotation failed", "err", err) + if tracker.journal != nil { + if err := tracker.journal.rotate(rejournal); err != nil { + log.Warn("Transaction journal rotation failed", "err", err) + } } } localGauge.Update(int64(len(tracker.all)))