The current implementation only checks if a peer should be banned during TryConnect. This PR adds a check using ShouldBanPeer() within the IncomingConnectionAcceptedAsync() method to ensure that peers are also evaluated for banning when an incoming connection is accepted.
Changes
Added ShouldBanPeer() check in IncomingConnectionAcceptedAsync().
Motivation
Enhancing the robustness of the peer banning mechanism by ensuring that peers are evaluated for banning not only during connection attempts but also when incoming connections are accepted.
Description
The current implementation only checks if a peer should be banned during
TryConnect
. This PR adds a check usingShouldBanPeer()
within theIncomingConnectionAcceptedAsync()
method to ensure that peers are also evaluated for banning when an incoming connection is accepted.Changes
ShouldBanPeer()
check inIncomingConnectionAcceptedAsync()
.Motivation
Enhancing the robustness of the peer banning mechanism by ensuring that peers are evaluated for banning not only during connection attempts but also when incoming connections are accepted.