mirror of
https://github.com/serai-dex/serai.git
synced 2025-01-03 17:40:34 +00:00
Restore create_if_missing to RocksDB code
This commit is contained in:
parent
3862731a12
commit
821f5d8de4
1 changed files with 1 additions and 0 deletions
|
@ -36,6 +36,7 @@ impl<T: ThreadMode + 'static> Db for Arc<TransactionDB<T>> {
|
||||||
pub type RocksDB = Arc<TransactionDB<SingleThreaded>>;
|
pub type RocksDB = Arc<TransactionDB<SingleThreaded>>;
|
||||||
pub fn new_rocksdb(path: &str) -> RocksDB {
|
pub fn new_rocksdb(path: &str) -> RocksDB {
|
||||||
let mut options = Options::default();
|
let mut options = Options::default();
|
||||||
|
options.create_if_missing(true);
|
||||||
options.set_compression_type(DBCompressionType::Zstd);
|
options.set_compression_type(DBCompressionType::Zstd);
|
||||||
Arc::new(TransactionDB::open(&options, &Default::default(), path).unwrap())
|
Arc::new(TransactionDB::open(&options, &Default::default(), path).unwrap())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue