mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
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.
This commit is contained in:
parent
7c107c2691
commit
5bac720fd4
1 changed files with 6 additions and 0 deletions
|
|
@ -185,6 +185,12 @@ func (tracker *TxTracker) loop() {
|
|||
tracker.TrackAll(transactions)
|
||||
return nil
|
||||
})
|
||||
|
||||
log.Info("Initializing journal writer after loading transactions")
|
||||
if err := tracker.journal.rotate(make(map[common.Address]types.Transactions)); err != nil {
|
||||
log.Warn("Failed to initialize journal writer", "err", err)
|
||||
}
|
||||
|
||||
defer tracker.journal.close()
|
||||
}
|
||||
var (
|
||||
|
|
|
|||
Loading…
Reference in a new issue