Skip to content

Commit

Permalink
Change open_and_get_aux to open DB in readonly mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Nov 16, 2024
1 parent 97fca3d commit a914255
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/merk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ impl Merk {
P: AsRef<Path>,
{
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)?;

Check warning on line 118 in src/merk/mod.rs

View check run for this annotation

Codecov / codecov/patch

src/merk/mod.rs#L117-L118

Added lines #L117 - L118 were not covered by tests
let aux_cf = db.cf_handle(AUX_CF_NAME).unwrap();
Ok(db.get_cf(aux_cf, key)?)
}
Expand Down

0 comments on commit a914255

Please sign in to comment.