Skip to content

Commit

Permalink
Merge of #6008
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 27, 2024
2 parents 0ff8be6 + 2658c8b commit 60588b5
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use slog::{debug, error, trace};
use types::EthSpec;

use crate::discovery::enr_ext::EnrExt;
use crate::peer_manager::peerdb::BanResult;
use crate::rpc::GoodbyeReason;
use crate::types::SyncState;
use crate::{metrics, ClearDialError};
Expand Down Expand Up @@ -201,7 +200,7 @@ impl<E: EthSpec> NetworkBehaviour for PeerManager<E> {
) -> Result<libp2p::swarm::THandler<Self>, ConnectionDenied> {
trace!(self.log, "Inbound connection"; "peer_id" => %peer_id, "multiaddr" => %remote_addr);
// We already checked if the peer was banned on `handle_pending_inbound_connection`.
if let Some(BanResult::BadScore) = self.ban_status(&peer_id) {
if self.ban_status(&peer_id).is_some() {
return Err(ConnectionDenied::new(
"Connection to peer rejected: peer has a bad score",
));
Expand Down

0 comments on commit 60588b5

Please sign in to comment.