mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Merge branch 'unstable' into merge-unstable-to-deneb-20231005
# Conflicts: # .github/workflows/test-suite.yml # Cargo.lock # beacon_node/execution_layer/Cargo.toml # beacon_node/execution_layer/src/test_utils/mock_builder.rs # beacon_node/execution_layer/src/test_utils/mod.rs # beacon_node/network/src/service/tests.rs # consensus/types/src/builder_bid.rs
This commit is contained in:
@@ -415,7 +415,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
|
||||
/// Reports if a peer is banned or not.
|
||||
///
|
||||
/// This is used to determine if we should accept incoming connections.
|
||||
pub fn ban_status(&self, peer_id: &PeerId) -> BanResult {
|
||||
pub fn ban_status(&self, peer_id: &PeerId) -> Option<BanResult> {
|
||||
self.network_globals.peers.read().ban_status(peer_id)
|
||||
}
|
||||
|
||||
@@ -815,7 +815,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
|
||||
) -> bool {
|
||||
{
|
||||
let mut peerdb = self.network_globals.peers.write();
|
||||
if !matches!(peerdb.ban_status(peer_id), BanResult::NotBanned) {
|
||||
if peerdb.ban_status(peer_id).is_some() {
|
||||
// don't connect if the peer is banned
|
||||
error!(self.log, "Connection has been allowed to a banned peer"; "peer_id" => %peer_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user