diff --git a/core/txpool/locals/journal.go b/core/txpool/locals/journal.go index 8db0fe94a0..aac59bd91f 100644 --- a/core/txpool/locals/journal.go +++ b/core/txpool/locals/journal.go @@ -119,10 +119,11 @@ func (journal *journal) load(add func([]*types.Transaction) []error) error { func (journal *journal) setupWriter() error { if journal.writer != nil { - if err := journal.writer.Close(); err != nil { + err := journal.writer.Close() + journal.writer = nil + if err != nil { return err } - journal.writer = nil } // Re-open the journal file for appending