pub struct NetworkHandler {
pub gossip: GossipDriver<ConnectionGater>,
pub discovery: Discv5Handler,
pub enr_receiver: Receiver<Enr>,
pub unsafe_block_signer_sender: Sender<Address>,
pub peer_score_inspector: Interval,
pub signer: Option<BlockSignerHandler>,
}Expand description
A network handler used to communicate with the network once it is started.
Fields§
§gossip: GossipDriver<ConnectionGater>The gossip driver.
discovery: Discv5HandlerThe discovery handler.
enr_receiver: Receiver<Enr>The receiver for the ENRs.
unsafe_block_signer_sender: Sender<Address>The sender for the unsafe block signer.
peer_score_inspector: IntervalThe peer score inspector. Is used to ban peers that are below a given threshold.
signer: Option<BlockSignerHandler>A handler for the block signer.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for NetworkHandler
impl !RefUnwindSafe for NetworkHandler
impl Send for NetworkHandler
impl !Sync for NetworkHandler
impl Unpin for NetworkHandler
impl !UnwindSafe for NetworkHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more