rotate journal upon DropAllTxs

This commit is contained in:
Jared Wasinger 2024-10-01 17:45:54 +07:00 committed by Felix Lange
parent 692834ec7a
commit 0209e9515e

View file

@ -247,8 +247,10 @@ func (p *LegacyPool) DropAllTxs() {
p.pending = make(map[common.Address]*list)
p.queue = make(map[common.Address]*list)
if !p.config.NoLocals && p.config.Journal != "" {
// TODO: do we need to truncate the existing journal here?
p.journal = newTxJournal(p.config.Journal)
if err := p.journal.rotate(p.local()); err != nil {
log.Warn("Failed to rotate transaction journal", "err", err)
}
}
}