Skip to content

Commit 9a871f4

Browse files
committed
update bucket
1 parent d653ac1 commit 9a871f4

File tree

3 files changed

+42
-10
lines changed

3 files changed

+42
-10
lines changed

cmd/juno/dbcmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func dbSize(cmd *cobra.Command, args []string) error {
215215
totalSize += bucketItem.Size
216216
totalCount += bucketItem.Count
217217

218-
if utils.AnyOf(b, db.StateTrie, db.ContractStorage, db.Class, db.ContractNonce, db.ContractDeploymentHeight) {
218+
if utils.AnyOf(b, db.ContractTrieContract, db.ContractTrieStorage, db.ClassTrie) {
219219
withoutHistorySize += bucketItem.Size
220220
withHistorySize += bucketItem.Size
221221

db/buckets.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ type Bucket byte
99
// keys like Bolt or MDBX does. We use a global prefix list as a poor
1010
// man's bucket alternative.
1111
const (
12-
StateTrie Bucket = iota // state metadata (e.g., the state root)
12+
StateTrie Bucket = iota // LEGACY state metadata (e.g., the state root)
1313
Peer // maps peer ID to peer multiaddresses
14-
ContractClassHash // maps contract addresses and class hashes
15-
ContractStorage // contract storages
14+
ContractClassHash // LEGACY maps contract addresses and class hashes
15+
ContractStorage // LEGACY contract storages
1616
Class // maps class hashes to classes
17-
ContractNonce // contract nonce
17+
ContractNonce // LEGACY contract nonce
1818
ChainHeight // Latest height of the blockchain
1919
BlockHeaderNumbersByHash
2020
BlockHeadersByNumber
@@ -26,7 +26,7 @@ const (
2626
ContractStorageHistory // [ContractStorageHistory] + ContractAddr + StorageLocation + BlockHeight -> StorageValue
2727
ContractNonceHistory // [ContractNonceHistory] + ContractAddr + BlockHeight -> ContractNonce
2828
ContractClassHashHistory // [ContractClassHashHistory] + ContractAddr + BlockHeight -> ContractClassHash
29-
ContractDeploymentHeight
29+
ContractDeploymentHeight // LEGACY
3030
L1Height
3131
SchemaVersion
3232
Unused // Previously used for storing Pending Block

db/buckets_enumer.go

+36-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)