mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
Mallory - Single commit
This commit is contained in:
@@ -5,7 +5,7 @@ mod metrics;
|
||||
mod nat;
|
||||
mod network_beacon_processor;
|
||||
mod persisted_dht;
|
||||
mod router;
|
||||
pub mod router;
|
||||
mod status;
|
||||
mod subnet_service;
|
||||
mod sync;
|
||||
|
||||
@@ -314,6 +314,7 @@ impl<T: BeaconChainTypes> Router<T> {
|
||||
Response::LightClientBootstrap(_)
|
||||
| Response::LightClientOptimisticUpdate(_)
|
||||
| Response::LightClientFinalityUpdate(_)
|
||||
| Response::Ping(_)
|
||||
| Response::LightClientUpdatesByRange(_) => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,6 +266,8 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
|
||||
debug!(fork_name = ?fork_context.current_fork(), "Current fork");
|
||||
|
||||
let keypair = lighthouse_network::load_private_key(&config);
|
||||
|
||||
// construct the libp2p service context
|
||||
let service_context = Context {
|
||||
config: config.clone(),
|
||||
@@ -273,6 +275,8 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
fork_context: fork_context.clone(),
|
||||
chain_spec: beacon_chain.spec.clone(),
|
||||
libp2p_registry,
|
||||
keypair,
|
||||
incoming_connections: None,
|
||||
};
|
||||
|
||||
// launch libp2p service
|
||||
@@ -283,6 +287,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
.data_availability_checker
|
||||
.custody_context()
|
||||
.custody_group_count_at_head(&beacon_chain.spec),
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
|
||||
@@ -487,6 +492,11 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
shutdown_sender: &mut Sender<ShutdownReason>,
|
||||
) {
|
||||
match ev {
|
||||
// mallory event
|
||||
NetworkEvent::MallorySwarmEvent(_) => {}
|
||||
// mallory event
|
||||
NetworkEvent::IdentifyReceived(_) => {}
|
||||
|
||||
NetworkEvent::PeerConnectedOutgoing(peer_id) => {
|
||||
self.send_to_router(RouterMessage::StatusPeer(peer_id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user