mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: invert p2p and network types dep (#10390)
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -7592,9 +7592,9 @@ dependencies = [
|
||||
"reth-consensus",
|
||||
"reth-eth-wire-types",
|
||||
"reth-network-peers",
|
||||
"reth-network-types",
|
||||
"reth-primitives",
|
||||
"reth-storage-errors",
|
||||
"serde",
|
||||
"tokio",
|
||||
"tracing",
|
||||
]
|
||||
@ -7622,7 +7622,6 @@ dependencies = [
|
||||
"humantime-serde",
|
||||
"reth-ethereum-forks",
|
||||
"reth-net-banlist",
|
||||
"reth-network-p2p",
|
||||
"reth-network-peers",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
||||
@ -16,9 +16,8 @@ workspace = true
|
||||
reth-network-peers.workspace = true
|
||||
reth-net-banlist.workspace = true
|
||||
reth-ethereum-forks.workspace = true
|
||||
reth-network-p2p.workspace = true
|
||||
|
||||
# io
|
||||
# misc
|
||||
serde = { workspace = true, optional = true }
|
||||
humantime-serde = { workspace = true, optional = true }
|
||||
serde_json = { workspace = true }
|
||||
@ -27,5 +26,5 @@ serde_json = { workspace = true }
|
||||
tracing.workspace = true
|
||||
|
||||
[features]
|
||||
serde = ["dep:serde", "dep:humantime-serde", "reth-network-p2p/serde"]
|
||||
serde = ["dep:serde", "dep:humantime-serde"]
|
||||
test-utils = []
|
||||
|
||||
@ -19,7 +19,7 @@ pub mod session;
|
||||
/// [`BackoffKind`] definition.
|
||||
mod backoff;
|
||||
|
||||
pub use reth_network_p2p::reputation::{Reputation, ReputationChangeKind, ReputationChangeWeights};
|
||||
pub use peers::reputation::{Reputation, ReputationChangeKind, ReputationChangeWeights};
|
||||
|
||||
pub use backoff::BackoffKind;
|
||||
pub use peers::{
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
pub mod addr;
|
||||
pub mod config;
|
||||
pub mod kind;
|
||||
pub mod reputation;
|
||||
pub mod state;
|
||||
|
||||
pub use reth_network_p2p::reputation;
|
||||
|
||||
pub use config::{ConnectionsConfig, PeersConfig};
|
||||
pub use reputation::ReputationChangeWeights;
|
||||
pub use reputation::{Reputation, ReputationChange, ReputationChangeKind, ReputationChangeWeights};
|
||||
|
||||
use reth_ethereum_forks::ForkId;
|
||||
use tracing::trace;
|
||||
|
||||
@ -16,11 +16,9 @@ reth-primitives.workspace = true
|
||||
reth-eth-wire-types.workspace = true
|
||||
reth-consensus.workspace = true
|
||||
reth-network-peers.workspace = true
|
||||
reth-network-types.workspace = true
|
||||
reth-storage-errors.workspace = true
|
||||
|
||||
# io
|
||||
serde = { workspace = true, optional = true }
|
||||
|
||||
# async
|
||||
futures.workspace = true
|
||||
tokio = { workspace = true, features = ["sync"] }
|
||||
@ -41,5 +39,4 @@ tokio = { workspace = true, features = ["full"] }
|
||||
[features]
|
||||
default = ["std"]
|
||||
test-utils = ["reth-consensus/test-utils", "parking_lot"]
|
||||
serde = ["dep:serde"]
|
||||
std = ["reth-consensus/std"]
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
use super::headers::client::HeadersRequest;
|
||||
use derive_more::Display;
|
||||
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 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>;
|
||||
|
||||
|
||||
@ -45,11 +45,8 @@ pub mod sync;
|
||||
#[cfg(any(test, feature = "test-utils"))]
|
||||
pub mod test_utils;
|
||||
|
||||
pub mod reputation;
|
||||
|
||||
pub use bodies::client::BodiesClient;
|
||||
pub use headers::client::HeadersClient;
|
||||
pub use reputation::{Reputation, ReputationChange, ReputationChangeKind, ReputationChangeWeights};
|
||||
|
||||
/// Helper trait that unifies network behaviour needed for fetching blocks.
|
||||
pub trait BlockClient: HeadersClient + BodiesClient + Unpin + Clone {}
|
||||
|
||||
Reference in New Issue
Block a user