Skip to content

Commit

Permalink
fix: add blobSidecars in db inspect (#2759)
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjunLi authored Nov 22, 2024
1 parent f6d3203 commit adcdbf3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/rawdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,7 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
receipts stat
tds stat
numHashPairings stat
blobSidecars stat
hashNumPairings stat
legacyTries stat
stateLookups stat
Expand Down Expand Up @@ -973,6 +974,8 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
legacyTries.Add(size)
case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerTDSuffix):
tds.Add(size)
case bytes.HasPrefix(key, BlockBlobSidecarsPrefix) && bytes.HasSuffix(key, BlockBlobSidecarsPrefix):
blobSidecars.Add(size)
case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerHashSuffix):
numHashPairings.Add(size)
case bytes.HasPrefix(key, headerNumberPrefix) && len(key) == (len(headerNumberPrefix)+common.HashLength):
Expand Down Expand Up @@ -1103,6 +1106,8 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
receipts.Add(size)
case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerTDSuffix):
tds.Add(size)
case bytes.HasPrefix(key, BlockBlobSidecarsPrefix) && bytes.HasSuffix(key, BlockBlobSidecarsPrefix):
blobSidecars.Add(size)
case bytes.HasPrefix(key, headerPrefix) && bytes.HasSuffix(key, headerHashSuffix):
numHashPairings.Add(size)
case bytes.HasPrefix(key, headerNumberPrefix) && len(key) == (len(headerNumberPrefix)+common.HashLength):
Expand Down Expand Up @@ -1134,6 +1139,7 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
{"Key-Value store", "Bodies", bodies.Size(), bodies.Count()},
{"Key-Value store", "Receipt lists", receipts.Size(), receipts.Count()},
{"Key-Value store", "Difficulties", tds.Size(), tds.Count()},
{"Key-Value store", "BlobSidecars", blobSidecars.Size(), blobSidecars.Count()},
{"Key-Value store", "Block number->hash", numHashPairings.Size(), numHashPairings.Count()},
{"Key-Value store", "Block hash->number", hashNumPairings.Size(), hashNumPairings.Count()},
{"Key-Value store", "Transaction index", txLookups.Size(), txLookups.Count()},
Expand Down

0 comments on commit adcdbf3

Please sign in to comment.