Skip to content

Commit 248572e

Browse files
authored
core/rawdb: db inspect move 'config' and 'shutdown' into 'meta data' (#22978)
* core/rawdb: db inspect move 'config' and 'shutdown' into 'meta data' * gofmt
1 parent ddeeb89 commit 248572e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

core/rawdb/database.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,8 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
316316
bloomTrieNodes stat
317317

318318
// Meta- and unaccounted data
319-
metadata stat
320-
unaccounted stat
321-
shutdownInfo stat
319+
metadata stat
320+
unaccounted stat
322321

323322
// Totals
324323
total common.StorageSize
@@ -355,6 +354,8 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
355354
storageSnaps.Add(size)
356355
case bytes.HasPrefix(key, preimagePrefix) && len(key) == (len(preimagePrefix)+common.HashLength):
357356
preimages.Add(size)
357+
case bytes.HasPrefix(key, configPrefix) && len(key) == (len(configPrefix)+common.HashLength):
358+
metadata.Add(size)
358359
case bytes.HasPrefix(key, bloomBitsPrefix) && len(key) == (len(bloomBitsPrefix)+10+common.HashLength):
359360
bloomBits.Add(size)
360361
case bytes.HasPrefix(key, BloomBitsIndexPrefix):
@@ -369,8 +370,6 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
369370
bytes.HasPrefix(key, []byte("bltIndex-")) ||
370371
bytes.HasPrefix(key, []byte("bltRoot-")): // Bloomtrie sub
371372
bloomTrieNodes.Add(size)
372-
case bytes.Equal(key, uncleanShutdownKey):
373-
shutdownInfo.Add(size)
374373
default:
375374
var accounted bool
376375
for _, meta := range [][]byte{
@@ -425,7 +424,6 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
425424
{"Key-Value store", "Storage snapshot", storageSnaps.Size(), storageSnaps.Count()},
426425
{"Key-Value store", "Clique snapshots", cliqueSnaps.Size(), cliqueSnaps.Count()},
427426
{"Key-Value store", "Singleton metadata", metadata.Size(), metadata.Count()},
428-
{"Key-Value store", "Shutdown metadata", shutdownInfo.Size(), shutdownInfo.Count()},
429427
{"Ancient store", "Headers", ancientHeadersSize.String(), ancients.String()},
430428
{"Ancient store", "Bodies", ancientBodiesSize.String(), ancients.String()},
431429
{"Ancient store", "Receipt lists", ancientReceiptsSize.String(), ancients.String()},

0 commit comments

Comments
 (0)