mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-06 13:04:58 -05:00
chore(net): Remove dependency reth-network-p2p -> reth-network-types (#9984)
This commit is contained in:
@@ -15,6 +15,7 @@ workspace = true
|
||||
# reth
|
||||
reth-network-peers.workspace = true
|
||||
reth-net-banlist.workspace = true
|
||||
reth-network-p2p.workspace = true
|
||||
|
||||
# io
|
||||
serde = { workspace = true, optional = true }
|
||||
@@ -25,5 +26,5 @@ serde_json = { workspace = true }
|
||||
tracing.workspace = true
|
||||
|
||||
[features]
|
||||
serde = ["dep:serde", "dep:humantime-serde"]
|
||||
serde = ["dep:serde", "dep:humantime-serde", "reth-network-p2p/serde"]
|
||||
test-utils = []
|
||||
|
||||
@@ -14,10 +14,7 @@
|
||||
|
||||
/// Types related to peering.
|
||||
pub mod peers;
|
||||
pub use peers::{
|
||||
reputation::{Reputation, ReputationChangeKind, ReputationChangeWeights},
|
||||
ConnectionsConfig, PeersConfig,
|
||||
};
|
||||
pub use peers::{ConnectionsConfig, PeersConfig};
|
||||
|
||||
pub mod session;
|
||||
pub use session::{SessionLimits, SessionsConfig};
|
||||
@@ -25,3 +22,5 @@ pub use session::{SessionLimits, SessionsConfig};
|
||||
/// [`BackoffKind`] definition.
|
||||
mod backoff;
|
||||
pub use backoff::BackoffKind;
|
||||
|
||||
pub use reth_network_p2p::reputation::{Reputation, ReputationChangeKind, ReputationChangeWeights};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
pub mod reputation;
|
||||
pub use reputation::ReputationChangeWeights;
|
||||
|
||||
pub mod config;
|
||||
|
||||
pub use reth_network_p2p::reputation;
|
||||
|
||||
pub use config::{ConnectionsConfig, PeersConfig};
|
||||
|
||||
@@ -17,7 +17,9 @@ reth-eth-wire-types.workspace = true
|
||||
reth-consensus.workspace = true
|
||||
reth-network-peers.workspace = true
|
||||
reth-storage-errors.workspace = true
|
||||
reth-network-types.workspace = true
|
||||
|
||||
# io
|
||||
serde = { workspace = true, optional = true }
|
||||
|
||||
# async
|
||||
futures.workspace = true
|
||||
@@ -38,3 +40,4 @@ tokio = { workspace = true, features = ["full"] }
|
||||
|
||||
[features]
|
||||
test-utils = ["reth-consensus/test-utils", "parking_lot"]
|
||||
serde = ["dep:serde"]
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
use super::headers::client::HeadersRequest;
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
use reth_consensus::ConsensusError;
|
||||
use reth_network_peers::WithPeerId;
|
||||
use reth_network_types::ReputationChangeKind;
|
||||
use reth_primitives::{
|
||||
BlockHashOrNumber, BlockNumber, GotExpected, GotExpectedBoxed, Header, B256,
|
||||
};
|
||||
use reth_storage_errors::{db::DatabaseError, provider::ProviderError};
|
||||
use std::ops::RangeInclusive;
|
||||
use thiserror::Error;
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
|
||||
use super::headers::client::HeadersRequest;
|
||||
use crate::ReputationChangeKind;
|
||||
|
||||
/// Result alias for result of a request.
|
||||
pub type RequestResult<T> = Result<T, RequestError>;
|
||||
|
||||
|
||||
@@ -44,3 +44,7 @@ pub mod sync;
|
||||
/// Common test helpers for mocking out Consensus, Downloaders and Header Clients.
|
||||
#[cfg(any(test, feature = "test-utils"))]
|
||||
pub mod test_utils;
|
||||
|
||||
pub mod reputation;
|
||||
|
||||
pub use reputation::{Reputation, ReputationChange, ReputationChangeKind, ReputationChangeWeights};
|
||||
|
||||
Reference in New Issue
Block a user