Skip to content

Commit

Permalink
core/txpool: no need to log loud rotate if no local txs (#29083)
Browse files Browse the repository at this point in the history
* core/txpool: no need to run rotate if no local txs

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "core/txpool: no need to run rotate if no local txs"

This reverts commit 17fab17.

Signed-off-by: jsvisa <delweng@gmail.com>

* use Debug if todo is empty

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
  • Loading branch information
jsvisa committed Feb 26, 2024
1 parent 63aaac8 commit 45a272c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/txpool/legacypool/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,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 {
logger = log.Debug
}
logger("Regenerated local transaction journal", "transactions", journaled, "accounts", len(all))

return nil
}
Expand Down

0 comments on commit 45a272c

Please sign in to comment.