feat(storage): add read-only mode for RocksDB provider (#21210)

Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com>
This commit is contained in:
Georgios Konstantopoulos
2026-01-20 08:09:51 -08:00
committed by GitHub
parent 5ef200eaad
commit 39d5ae73e8
3 changed files with 232 additions and 59 deletions

View File

@@ -121,10 +121,10 @@ impl<C: ChainSpecParser> EnvironmentArgs<C> {
})
}
};
// TransactionDB only support read-write mode
let rocksdb_provider = RocksDBProvider::builder(data_dir.rocksdb())
.with_default_tables()
.with_database_log_level(self.db.log_level)
.with_read_only(!access.is_read_write())
.build()?;
let provider_factory =