refactor: use channel id for rocksdb filename [skip ci]

This commit is contained in:
erhant 2026-06-22 13:16:35 +03:00
parent 1c1e80f646
commit c0fbaaf08e
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -24,7 +24,9 @@ pub struct IndexerCore {
impl IndexerCore {
pub fn new(config: IndexerConfig, storage_dir: &Path) -> Result<Self> {
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(