diff --git a/crates/cli/commands/src/db/settings.rs b/crates/cli/commands/src/db/settings.rs index 072312cfb41..c89d144c2be 100644 --- a/crates/cli/commands/src/db/settings.rs +++ b/crates/cli/commands/src/db/settings.rs @@ -92,6 +92,7 @@ impl Command { receipts_in_static_files: _, transaction_senders_in_static_files: _, storages_history_in_rocksdb: _, + transaction_hash_numbers_in_rocksdb: _, } = settings.unwrap_or_else(StorageSettings::legacy); // Update the setting based on the key diff --git a/crates/storage/db-api/src/models/metadata.rs b/crates/storage/db-api/src/models/metadata.rs index de68998ce6e..67ef25a5ea3 100644 --- a/crates/storage/db-api/src/models/metadata.rs +++ b/crates/storage/db-api/src/models/metadata.rs @@ -22,6 +22,9 @@ pub struct StorageSettings { /// Whether `StoragesHistory` is stored in `RocksDB`. #[serde(default)] pub storages_history_in_rocksdb: bool, + /// Whether `TransactionHashNumbers` is stored in `RocksDB`. + #[serde(default)] + pub transaction_hash_numbers_in_rocksdb: bool, } impl StorageSettings { @@ -35,6 +38,7 @@ impl StorageSettings { receipts_in_static_files: false, transaction_senders_in_static_files: false, storages_history_in_rocksdb: false, + transaction_hash_numbers_in_rocksdb: false, } } @@ -55,4 +59,10 @@ impl StorageSettings { self.storages_history_in_rocksdb = value; self } + + /// Sets the `transaction_hash_numbers_in_rocksdb` flag to the provided value. + pub const fn with_transaction_hash_numbers_in_rocksdb(mut self, value: bool) -> Self { + self.transaction_hash_numbers_in_rocksdb = value; + self + } }