Skip to content

Commit fa68054

Browse files
authored
Merge pull request #2680 from CortexFoundation/dev
core/rawdb: fix key length check for num -- hash in db inspect
2 parents aae59a5 + 5c5f379 commit fa68054

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/rawdb/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ func InspectDatabase(db ctxcdb.Database, keyPrefix, keyStart []byte) error {
477477
receipts.add(size)
478478
case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerTDSuffix) && len(key) == (len(headerPrefix)+8+common.HashLength+len(headerTDSuffix)):
479479
tds.add(size)
480-
case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerHashSuffix) && len(key) == (len(headerPrefix)+8+common.HashLength+len(headerHashSuffix)):
480+
case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerHashSuffix) && len(key) == (len(headerPrefix)+8+len(headerHashSuffix)):
481481
numHashPairings.add(size)
482482
case bytes.HasPrefix(key, headerNumberPrefix) && len(key) == (len(headerNumberPrefix)+common.HashLength):
483483
hashNumPairings.add(size)

0 commit comments

Comments
 (0)