Skip to content

Commit 5cdf50c

Browse files
committed
fix: add sentinel error
1 parent ffd26b6 commit 5cdf50c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graft/coreth/core/state/snapshot/journal.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import (
4444

4545
var (
4646
errSnapshotRootEmpty = errors.New("missing or corrupted snapshot, no snapshot root")
47+
errSnapshotBlockHashEmpty = errors.New("missing or corrupted snapshot, no snapshot block hash")
4748
errSnapshotRootMismatch = errors.New("snapshot root mismatch")
4849
errSnapshotGeneratorMissing = errors.New("missing snapshot generator")
4950
)
@@ -68,7 +69,7 @@ func loadSnapshot(diskdb ethdb.KeyValueStore, triedb *triedb.Database, cache int
6869
// Retrieve the block hash of the snapshot, failing if no snapshot is present.
6970
baseBlockHash, err := customrawdb.ReadSnapshotBlockHash(diskdb)
7071
if err != nil {
71-
return nil, false, errors.New("missing or corrupted snapshot, no snapshot block hash")
72+
return nil, false, errSnapshotBlockHashEmpty
7273
}
7374

7475
// Retrieve and validate the snapshot root.

0 commit comments

Comments
 (0)