Skip to content

Commit

Permalink
Use or instead of and
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Jun 6, 2024
1 parent 6d42ebc commit de97efc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beacon_node/lighthouse_network/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1378,10 +1378,10 @@ impl<AppReqId: ReqId, E: EthSpec> Network<AppReqId, E> {
) -> Option<NetworkEvent<AppReqId, E>> {
let peer_id = event.peer_id;

// Do not permit Inbound events from peers that are being disconnected, or RPC requests.
if !self.peer_manager().is_connected(&peer_id)
// Do not permit Inbound events from peers that are being disconnected
&& matches!(event.event, HandlerEvent::Err(HandlerErr::Inbound { .. }))
&& matches!(event.event, HandlerEvent::Ok(RPCReceived::Request(..)))
&& (matches!(event.event, HandlerEvent::Err(HandlerErr::Inbound { .. }))
|| matches!(event.event, HandlerEvent::Ok(RPCReceived::Request(..))))
{
debug!(
self.log,
Expand Down

0 comments on commit de97efc

Please sign in to comment.