reth_network_types/
lib.rs

1//! Commonly used networking types.
2//!
3//! ## Feature Flags
4//!
5//! - `serde` (default): Enable serde support
6
7#![doc(
8    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
9    html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
10    issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
11)]
12#![cfg_attr(not(test), warn(unused_crate_dependencies))]
13#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
14
15/// Types related to peering.
16pub mod peers;
17pub mod session;
18
19/// [`BackoffKind`] definition.
20mod backoff;
21
22pub use peers::reputation::{Reputation, ReputationChangeKind, ReputationChangeWeights};
23
24pub use backoff::BackoffKind;
25pub use peers::{
26    addr::PeerAddr,
27    kind::PeerKind,
28    reputation::{is_banned_reputation, ReputationChangeOutcome, DEFAULT_REPUTATION},
29    state::PeerConnectionState,
30    ConnectionsConfig, Peer, PeersConfig,
31};
32pub use session::{SessionLimits, SessionsConfig};