chore: split db abstraction into new crate (#8594)

This commit is contained in:
Oliver
2024-06-04 23:45:57 +02:00
committed by GitHub
parent a8095740fc
commit 51a28f22da
183 changed files with 825 additions and 755 deletions

View File

@ -23,6 +23,7 @@ reth-network-types.workspace = true
# optional deps for the test-utils feature
reth-db = { workspace = true, optional = true }
reth-db-api = { workspace = true, optional = true }
reth-testing-utils = { workspace = true, optional = true }
# eth
@ -50,6 +51,7 @@ itertools.workspace = true
[dev-dependencies]
reth-db = { workspace = true, features = ["test-utils"] }
reth-db-api.workspace = true
reth-consensus = { workspace = true, features = ["test-utils"] }
reth-network-p2p = { workspace = true, features = ["test-utils"] }
reth-provider = { workspace = true, features = ["test-utils"] }
@ -65,5 +67,11 @@ rand.workspace = true
tempfile.workspace = true
[features]
test-utils = ["dep:tempfile", "reth-db/test-utils", "reth-consensus/test-utils", "reth-network-p2p/test-utils", "reth-testing-utils"]
test-utils = [
"dep:tempfile",
"dep:reth-db-api",
"reth-db/test-utils",
"reth-consensus/test-utils",
"reth-network-p2p/test-utils",
"reth-testing-utils",
]

View File

@ -2,7 +2,8 @@
#![allow(dead_code)]
use reth_db::{database::Database, tables, transaction::DbTxMut, DatabaseEnv};
use reth_db::{tables, DatabaseEnv};
use reth_db_api::{database::Database, transaction::DbTxMut};
use reth_network_p2p::bodies::response::BlockResponse;
use reth_primitives::{Block, BlockBody, SealedBlock, SealedHeader, B256};
use std::collections::HashMap;