mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 10:52:43 +00:00
Implement Goodbye and BeaconState msg handlers
This commit is contained in:
@@ -119,6 +119,16 @@ impl SimpleSync {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn on_goodbye(&mut self, peer_id: PeerId, reason: GoodbyeReason) {
|
||||
info!(
|
||||
self.log, "PeerGoodbye";
|
||||
"peer" => format!("{:?}", peer_id),
|
||||
"reason" => format!("{:?}", reason),
|
||||
);
|
||||
|
||||
self.known_peers.remove(&peer_id);
|
||||
}
|
||||
|
||||
pub fn on_connect(&self, peer_id: PeerId, network: &mut NetworkContext) {
|
||||
info!(self.log, "PeerConnect"; "peer" => format!("{:?}", peer_id));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user