From 5c5f379d0ba9e492667f425d848de3a227a1973c Mon Sep 17 00:00:00 2001 From: ucwong Date: Wed, 25 Mar 2026 09:32:36 +0000 Subject: [PATCH] core/rawdb: fix key length check for num -- hash in db inspect --- core/rawdb/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/rawdb/database.go b/core/rawdb/database.go index 70044d1f7f..ee56f9fb68 100644 --- a/core/rawdb/database.go +++ b/core/rawdb/database.go @@ -477,7 +477,7 @@ func InspectDatabase(db ctxcdb.Database, keyPrefix, keyStart []byte) error { receipts.add(size) case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerTDSuffix) && len(key) == (len(headerPrefix)+8+common.HashLength+len(headerTDSuffix)): tds.add(size) - case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerHashSuffix) && len(key) == (len(headerPrefix)+8+common.HashLength+len(headerHashSuffix)): + case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerHashSuffix) && len(key) == (len(headerPrefix)+8+len(headerHashSuffix)): numHashPairings.add(size) case bytes.HasPrefix(key, headerNumberPrefix) && len(key) == (len(headerNumberPrefix)+common.HashLength): hashNumPairings.add(size)