Skip to content

Commit 5bac720

Browse files
authored
Initialize journal writer soon after loading instead of waiting for the first time rejournal.
Previously, the journal writer is nil until the first time rejournal (default 1h), which means during this period, txs submitted to this node are not written into journal file.
1 parent 7c107c2 commit 5bac720

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/txpool/locals/tx_tracker.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ func (tracker *TxTracker) loop() {
185185
tracker.TrackAll(transactions)
186186
return nil
187187
})
188+
189+
log.Info("Initializing journal writer after loading transactions")
190+
if err := tracker.journal.rotate(make(map[common.Address]types.Transactions)); err != nil {
191+
log.Warn("Failed to initialize journal writer", "err", err)
192+
}
193+
188194
defer tracker.journal.close()
189195
}
190196
var (

0 commit comments

Comments
 (0)