def manageConnections(classifiedPeers)

      n = classifiedPeers.handshakingPeers.size + classifiedPeers.establishedPeers.size
      if n < @targetActivePeerCount
        result = classifiedPeers.disconnectedPeers.shuffle.first(@targetActivePeerCount - n)
        @logger.debug "There are #{n} peers connected or in handshaking. Will establish #{result.size} more connections to peers."
        result
      else
        []
      end
    end
def manageConnections(classifiedPeers)

      n = classifiedPeers.handshakingPeers.size + classifiedPeers.establishedPeers.size
      if n < @targetActivePeerCount
        result = classifiedPeers.disconnectedPeers.shuffle.first(@targetActivePeerCount - n)
        @logger.debug "There are #{n} peers connected or in handshaking. Will establish #{result.size} more connections to peers."
        result
      else
        []
      end
    end
Determine if we need to connect to more peers.
 Returns a list of peers to connect to.