mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: rm network event handling from node events (#12736)
This commit is contained in:
@ -7,7 +7,7 @@ use alloy_rpc_types_engine::ForkchoiceState;
|
||||
use futures::Stream;
|
||||
use reth_beacon_consensus::{BeaconConsensusEngineEvent, ConsensusEngineLiveSyncProgress};
|
||||
use reth_engine_primitives::ForkchoiceStatus;
|
||||
use reth_network_api::{NetworkEvent, PeersInfo};
|
||||
use reth_network_api::PeersInfo;
|
||||
use reth_primitives_traits::{format_gas, format_gas_throughput};
|
||||
use reth_prune_types::PrunerEvent;
|
||||
use reth_stages::{EntitiesCheckpoint, ExecOutput, PipelineEvent, StageCheckpoint, StageId};
|
||||
@ -211,12 +211,6 @@ impl NodeState {
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_network_event(&self, _: NetworkEvent) {
|
||||
// NOTE(onbjerg): This used to log established/disconnecting sessions, but this is already
|
||||
// logged in the networking component. I kept this stub in case we want to catch other
|
||||
// networking events later on.
|
||||
}
|
||||
|
||||
fn handle_consensus_engine_event(&mut self, event: BeaconConsensusEngineEvent) {
|
||||
match event {
|
||||
BeaconConsensusEngineEvent::ForkchoiceUpdated(state, status) => {
|
||||
@ -358,8 +352,6 @@ struct CurrentStage {
|
||||
/// A node event.
|
||||
#[derive(Debug)]
|
||||
pub enum NodeEvent {
|
||||
/// A network event.
|
||||
Network(NetworkEvent),
|
||||
/// A sync pipeline event.
|
||||
Pipeline(PipelineEvent),
|
||||
/// A consensus engine event.
|
||||
@ -375,12 +367,6 @@ pub enum NodeEvent {
|
||||
Other(String),
|
||||
}
|
||||
|
||||
impl From<NetworkEvent> for NodeEvent {
|
||||
fn from(event: NetworkEvent) -> Self {
|
||||
Self::Network(event)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PipelineEvent> for NodeEvent {
|
||||
fn from(event: PipelineEvent) -> Self {
|
||||
Self::Pipeline(event)
|
||||
@ -527,9 +513,6 @@ where
|
||||
|
||||
while let Poll::Ready(Some(event)) = this.events.as_mut().poll_next(cx) {
|
||||
match event {
|
||||
NodeEvent::Network(event) => {
|
||||
this.state.handle_network_event(event);
|
||||
}
|
||||
NodeEvent::Pipeline(event) => {
|
||||
this.state.handle_pipeline_event(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user