From 823367638e67cbe4490f90d94165421862924d28 Mon Sep 17 00:00:00 2001 From: Chris Li <271678682li@gmail.com> Date: Thu, 18 Apr 2024 16:06:39 +0800 Subject: [PATCH] core: check journalType before load journal --- triedb/pathdb/journal.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/triedb/pathdb/journal.go b/triedb/pathdb/journal.go index 96e4239969..5a70d0b3c2 100644 --- a/triedb/pathdb/journal.go +++ b/triedb/pathdb/journal.go @@ -462,7 +462,7 @@ func (dl *diskLayer) journal(w io.Writer, journalType JournalType) error { } // Store the journal buf into w and calculate checksum - if journalType == JournalKVType { + if journalType == JournalFileType { shasum := sha256.Sum256(journalBuf.Bytes()) if err := rlp.Encode(w, journalBuf.Bytes()); err != nil { return err @@ -537,7 +537,7 @@ func (dl *diffLayer) journal(w io.Writer, journalType JournalType) error { } // Store the journal buf into w and calculate checksum - if journalType == JournalKVType { + if journalType == JournalFileType { shasum := sha256.Sum256(journalBuf.Bytes()) if err := rlp.Encode(w, journalBuf.Bytes()); err != nil { return err