From a914255712fb609bbfb093150b745ab1b0152182 Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Fri, 15 Nov 2024 23:08:46 -0600 Subject: [PATCH] Change open_and_get_aux to open DB in readonly mode --- src/merk/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/merk/mod.rs b/src/merk/mod.rs index 88834b2..3eb2859 100644 --- a/src/merk/mod.rs +++ b/src/merk/mod.rs @@ -114,7 +114,8 @@ impl Merk { P: AsRef, { let db_opts = Merk::default_db_opts(); - let db = rocksdb::DB::open_cf_descriptors(&db_opts, path, column_families())?; + let db = + rocksdb::DB::open_cf_descriptors_read_only(&db_opts, path, column_families(), false)?; let aux_cf = db.cf_handle(AUX_CF_NAME).unwrap(); Ok(db.get_cf(aux_cf, key)?) }