mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Peer scoring updates (#1342)
* Prevent banned peers from interacting with the behaviour * Update smallvec * Add logs * Correct log update
This commit is contained in:
@@ -798,6 +798,11 @@ impl<TSpec: EthSpec> NetworkBehaviour for Behaviour<TSpec> {
|
||||
conn_id: ConnectionId,
|
||||
event: <Self::ProtocolsHandler as ProtocolsHandler>::OutEvent,
|
||||
) {
|
||||
// All events from banned peers are rejected
|
||||
if self.peer_manager.is_banned(&peer_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
match event {
|
||||
// Events comming from the handler, redirected to each behaviour
|
||||
BehaviourHandlerOut::Delegate(delegate) => match *delegate {
|
||||
|
||||
Reference in New Issue
Block a user