feat(db): Refactor storage libraries (#371)

This commit is contained in:
rakita
2022-12-10 08:14:07 +01:00
committed by GitHub
parent 37e016d4a3
commit e014eaad33
139 changed files with 790 additions and 604 deletions

View File

@ -20,6 +20,7 @@ reth-rlp = { path = "../../common/rlp" }
reth-rlp-derive = { path = "../../common/rlp-derive" }
reth-tasks = { path = "../../tasks" }
reth-transaction-pool = { path = "../../transaction-pool" }
reth-provider = { path = "../../storage/provider"}
# async/futures
futures = "0.3"
@ -47,6 +48,7 @@ secp256k1 = { version = "0.24", features = [
[dev-dependencies]
# reth
reth-interfaces = { path = "../../interfaces", features = ["test-utils"] }
reth-provider = { path = "../../storage/provider", features = ["test-utils"] }
reth-tracing = { path = "../../tracing" }
rand = "0.8"

View File

@ -6,11 +6,9 @@ use reth_eth_wire::{
BlockBodies, BlockBody, BlockHeaders, GetBlockBodies, GetBlockHeaders, GetNodeData,
GetReceipts, NodeData, Receipts,
};
use reth_interfaces::{
p2p::error::RequestResult,
provider::{BlockProvider, HeaderProvider},
};
use reth_interfaces::p2p::error::RequestResult;
use reth_primitives::{BlockHashOrNumber, Header, HeadersDirection, PeerId};
use reth_provider::{BlockProvider, HeaderProvider};
use std::{
borrow::Borrow,
future::Future,

View File

@ -37,8 +37,8 @@ use reth_eth_wire::{
capability::{Capabilities, CapabilityMessage},
DisconnectReason,
};
use reth_interfaces::provider::BlockProvider;
use reth_primitives::{PeerId, H256};
use reth_provider::BlockProvider;
use std::{
net::SocketAddr,
pin::Pin,

View File

@ -14,8 +14,8 @@ use crate::{
use reth_eth_wire::{
capability::Capabilities, BlockHashNumber, DisconnectReason, NewBlockHashes, Status,
};
use reth_interfaces::provider::BlockProvider;
use reth_primitives::{PeerId, H256};
use reth_provider::BlockProvider;
use std::{
collections::{HashMap, VecDeque},
net::SocketAddr,

View File

@ -10,8 +10,8 @@ use reth_eth_wire::{
capability::{Capabilities, CapabilityMessage},
error::EthStreamError,
};
use reth_interfaces::provider::BlockProvider;
use reth_primitives::PeerId;
use reth_provider::BlockProvider;
use std::{
io,
net::SocketAddr,

View File

@ -3,8 +3,8 @@
use super::testnet::Testnet;
use futures::StreamExt;
use reth_discv4::{bootnodes::mainnet_nodes, Discv4Config};
use reth_interfaces::test_utils::TestApi;
use reth_network::{NetworkConfig, NetworkEvent, NetworkManager};
use reth_provider::test_utils::TestApi;
use secp256k1::SecretKey;
use std::{collections::HashSet, sync::Arc};

View File

@ -3,10 +3,6 @@
use futures::{FutureExt, StreamExt};
use parking_lot::Mutex;
use pin_project::pin_project;
use reth_interfaces::{
provider::{BlockProvider, ChainInfo, HeaderProvider},
test_utils::TestApi,
};
use reth_network::{
error::NetworkError, eth_requests::EthRequestHandler, NetworkConfig, NetworkEvent,
NetworkHandle, NetworkManager,
@ -15,6 +11,7 @@ use reth_primitives::{
rpc::{BlockId, BlockNumber},
Block, BlockHash, Header, PeerId, H256, U256,
};
use reth_provider::{test_utils::TestApi, BlockProvider, ChainInfo, HeaderProvider};
use secp256k1::SecretKey;
use std::{
collections::HashMap,