Fixed incorrect minOutboundPeers conditional

This commit is contained in:
CalDescent 2022-05-01 14:01:58 +01:00
parent 599877195b
commit fbe4f3fad8

View File

@ -701,8 +701,8 @@ public class Network {
}
public boolean connectPeer(Peer newPeer) throws InterruptedException {
// NOT CORRECT:
if (getImmutableConnectedPeers().size() >= minOutboundPeers)
// Also checked before creating PeerConnectTask
if (getImmutableOutboundHandshakedPeers().size() >= minOutboundPeers)
return false;
SocketChannel socketChannel = newPeer.connect();