@@ -418,13 +418,13 @@ class PeerManagerSpec
418
418
val pruned = peers.foldLeft(pruning) { case (ps, p) =>
419
419
ps.removeTerminatedPeer(p.ref)._2
420
420
}
421
- // ignore should be at the minimum incoming peer count now.
421
+ // Incoming connections should be at the minimum incoming peer count now.
422
422
PeerManagerActor .numberOfIncomingConnectionsToPrune(pruned, peerConfiguration) shouldBe 0
423
423
424
424
val replenished = newIncoming.foldLeft(pruned) { case (ps, p) =>
425
425
ps.addNewPendingPeer(p).promotePeerToHandshaked(p)
426
426
}
427
- // ignore should be maxed out now, can prune again.
427
+ // Incoming connections should be maxed out now, can prune again.
428
428
PeerManagerActor .numberOfIncomingConnectionsToPrune(replenished, peerConfiguration) shouldBe > (0 )
429
429
}
430
430
}
@@ -585,7 +585,6 @@ class PeerManagerSpec
585
585
incoming <- Gen .listOfN(numIncoming, genIncomingPeer)
586
586
outgoing <- Gen .listOfN(numOutgoing, genOugoingPeer)
587
587
connections0 = (incoming ++ outgoing).foldLeft(ConnectedPeers .empty)(_ addNewPendingPeer _)
588
- ratioHandshaked <- Gen .choose(0.75 , 1.0 )
589
588
numHandshaked <- Gen .choose(0.75 , 1.0 ).map(_ * (numIncoming + numOutgoing)).map(_.toInt)
590
589
handshaked <- Gen .pick(numHandshaked, incoming ++ outgoing)
591
590
connections1 = handshaked.foldLeft(connections0)(_ promotePeerToHandshaked _)
0 commit comments