Let recheck work while journal path is empty and fix TestResubmit

This commit is contained in:
Kyrin 2025-10-21 12:19:22 +08:00 committed by GitHub
parent 5c5a9a8d14
commit ee20ddbb82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -157,10 +157,12 @@ 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 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)))
log.Debug("Tx tracker status", "need-resubmit", len(resubmits), "stale", numStales, "ok", numOk)
return resubmits