From c0fbaaf08e94b7cd046caa876c65590d2a6de620 Mon Sep 17 00:00:00 2001 From: erhant Date: Mon, 22 Jun 2026 13:16:35 +0300 Subject: [PATCH] refactor: use channel id for rocksdb filename [skip ci] --- Justfile | 4 ++-- lez/indexer/core/src/lib.rs | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Justfile b/Justfile index 87cab5b7..690bdc1d 100644 --- a/Justfile +++ b/Justfile @@ -93,7 +93,7 @@ clean: @echo "🧹 Cleaning run artifacts" rm -rf lez/sequencer/service/bedrock_signing_key rm -rf lez/sequencer/service/rocksdb - rm -rf lez/indexer/service/rocksdb + rm -rf lez/indexer/service/rocksdb* rm -rf lez/wallet/configs/debug/storage.json - rm -rf rocksdb + rm -rf rocksdb* cd bedrock && docker compose down -v diff --git a/lez/indexer/core/src/lib.rs b/lez/indexer/core/src/lib.rs index e05fdd1f..d8890af2 100644 --- a/lez/indexer/core/src/lib.rs +++ b/lez/indexer/core/src/lib.rs @@ -24,7 +24,9 @@ pub struct IndexerCore { impl IndexerCore { pub fn new(config: IndexerConfig, storage_dir: &Path) -> Result { - let home = storage_dir.join("rocksdb"); + // Namespace the DB by channel so indexers on different channels can + // share a storage dir without their RocksDB state colliding. + let home = storage_dir.join(format!("rocksdb-{}", config.channel_id)); let basic_auth = config.bedrock_config.auth.clone().map(Into::into); let node = NodeHttpClient::new(