Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion core/txpool/legacypool/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@ func (journal *journal) rotate(all map[common.Address]types.Transactions) error
return err
}
journal.writer = sink
log.Info("Regenerated local transaction journal", "transactions", journaled, "accounts", len(all))

logger := log.Info
if len(all) == 0 {
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log level switch uses len(all) == 0, but the intent (per PR title) is to downgrade when there are no local txs. Since all is keyed by accounts, it’s possible for len(all) > 0 while journaled == 0 (e.g., an account entry exists but its tx list is empty), which would still emit an Info-level log. Consider switching the condition to journaled == 0 (or journaled == 0 && len(all) == 0 if you specifically want ‘no accounts’) to match the actual ‘no txs’ case.

Suggested change
if len(all) == 0 {
if journaled == 0 {

Copilot uses AI. Check for mistakes.
logger = log.Debug
}
logger("Regenerated local transaction journal", "transactions", journaled, "accounts", len(all))

return nil
}
Expand Down
Loading