mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: add Peers trait und decouple rpc from NetworkHandle (#1100)
This commit is contained in:
@ -9,7 +9,7 @@ use crate::{
|
||||
use futures::StreamExt;
|
||||
use reth_eth_wire::{errors::EthStreamError, DisconnectReason};
|
||||
use reth_net_common::ban_list::BanList;
|
||||
use reth_network_api::ReputationChangeKind;
|
||||
use reth_network_api::{PeerKind, ReputationChangeKind};
|
||||
use reth_primitives::{ForkId, NodeRecord, PeerId};
|
||||
use std::{
|
||||
collections::{hash_map::Entry, HashMap, HashSet, VecDeque},
|
||||
@ -860,16 +860,6 @@ impl PeerConnectionState {
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents the kind of peer
|
||||
#[derive(Debug, Clone, Copy, Default, Eq, PartialEq)]
|
||||
pub enum PeerKind {
|
||||
/// Basic peer kind.
|
||||
#[default]
|
||||
Basic,
|
||||
/// Trusted peer.
|
||||
Trusted,
|
||||
}
|
||||
|
||||
/// Commands the [`PeersManager`] listens for.
|
||||
pub(crate) enum PeerCommand {
|
||||
/// Command for manually add
|
||||
|
||||
Reference in New Issue
Block a user