Skip to content

Commit 5c5f379

Browse files
committed
core/rawdb: fix key length check for num -- hash in db inspect
1 parent 2f236df commit 5c5f379

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)