From 3d231adb2ee8999ed66b0b59c1e548c00bc8911c Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 24 May 2024 14:01:09 +0200 Subject: [PATCH] chore: move sync to p2p crate --- Cargo.lock | 1 - crates/interfaces/Cargo.toml | 2 -- crates/interfaces/src/lib.rs | 2 +- crates/net/p2p/src/lib.rs | 3 +++ crates/{interfaces => net/p2p}/src/sync.rs | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename crates/{interfaces => net/p2p}/src/sync.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 7acc4841539a..773067f9d4f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7040,7 +7040,6 @@ dependencies = [ name = "reth-interfaces" version = "0.2.0-beta.7" dependencies = [ - "auto_impl", "reth-consensus", "reth-execution-errors", "reth-fs-util", diff --git a/crates/interfaces/Cargo.toml b/crates/interfaces/Cargo.toml index 67891f5c7166..1d7483691bf4 100644 --- a/crates/interfaces/Cargo.toml +++ b/crates/interfaces/Cargo.toml @@ -20,10 +20,8 @@ reth-primitives.workspace = true reth-storage-errors.workspace = true # misc -auto_impl.workspace = true thiserror.workspace = true - [features] test-utils = ["reth-consensus/test-utils", "reth-network-p2p/test-utils"] clap = ["reth-storage-errors/clap"] \ No newline at end of file diff --git a/crates/interfaces/src/lib.rs b/crates/interfaces/src/lib.rs index dd96e2358085..461413a1e2f1 100644 --- a/crates/interfaces/src/lib.rs +++ b/crates/interfaces/src/lib.rs @@ -29,7 +29,7 @@ pub use reth_network_p2p as p2p; pub use reth_execution_errors::trie; /// Syncing related traits. -pub mod sync; +pub use reth_network_p2p::sync; /// BlockchainTree related traits. pub mod blockchain_tree; diff --git a/crates/net/p2p/src/lib.rs b/crates/net/p2p/src/lib.rs index ed20ab849d8c..310afc799813 100644 --- a/crates/net/p2p/src/lib.rs +++ b/crates/net/p2p/src/lib.rs @@ -38,6 +38,9 @@ pub mod error; /// Priority enum for BlockHeader and BlockBody requests pub mod priority; +/// Syncing related traits. +pub mod sync; + /// Common test helpers for mocking out Consensus, Downloaders and Header Clients. #[cfg(any(test, feature = "test-utils"))] pub mod test_utils; diff --git a/crates/interfaces/src/sync.rs b/crates/net/p2p/src/sync.rs similarity index 100% rename from crates/interfaces/src/sync.rs rename to crates/net/p2p/src/sync.rs