triedb/pathdb: fix swapped want/got args in journal-root mismatch error (#35067)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

This commit is contained in:
Nikhil 2026-05-29 06:08:04 +05:30 committed by GitHub
parent 61342e9c01
commit 0ef867b292
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -92,7 +92,7 @@ func (db *Database) loadJournal(diskRoot common.Hash) (layer, error) {
// The journal is not matched with persistent state, discard them. // The journal is not matched with persistent state, discard them.
// It can happen that geth crashes without persisting the journal. // It can happen that geth crashes without persisting the journal.
if !bytes.Equal(root.Bytes(), diskRoot.Bytes()) { if !bytes.Equal(root.Bytes(), diskRoot.Bytes()) {
return nil, fmt.Errorf("%w want %x got %x", errUnmatchedJournal, root, diskRoot) return nil, fmt.Errorf("%w want %x got %x", errUnmatchedJournal, diskRoot, root)
} }
// Load the disk layer from the journal // Load the disk layer from the journal
base, err := db.loadDiskLayer(r) base, err := db.loadDiskLayer(r)