refactor: move mdbx::test-utils to reth_db::test-utils and add DatabaseEnvRO (#3466)

This commit is contained in:
joshieDo
2023-06-30 00:52:26 +01:00
committed by GitHub
parent 7850cc0b8d
commit c3ea430e4a
39 changed files with 227 additions and 213 deletions

View File

@ -12,7 +12,6 @@ use proptest::{
};
use reth_db::{
cursor::{DbCursorRW, DbDupCursorRO, DbDupCursorRW},
mdbx::Env,
TxHashNumber,
};
use std::{collections::HashSet, time::Instant};
@ -86,7 +85,7 @@ where
let setup = || {
// Reset DB
let _ = std::fs::remove_dir_all(bench_db_path);
let db = create_test_db_with_path::<WriteMap>(EnvKind::RW, bench_db_path);
let db = Arc::try_unwrap(create_test_rw_db_with_path(bench_db_path)).unwrap();
let mut unsorted_input = unsorted_input.clone();
if scenario_str == "append_all" {