Remind not to send direct message to oneself in network stress test

This commit is contained in:
Ivan Vilata-i-Balaguer 2016-05-17 10:33:02 +02:00
parent 1f6ea10bd6
commit bad681d8e8

View File

@ -304,6 +304,7 @@ public class NetworkStressTest {
long nextSendMillis = System.currentTimeMillis();
for (int i = 0; i < directCount; i++) {
// Select a random peer and send a direct message to it...
// TODO: Do not send the message to oneself.
final int dstPeerIdx = (int) (Math.random() * nPeers);
final P2PService dstPeer = peerNodes.get(dstPeerIdx);
final NodeAddress dstPeerAddress = dstPeer.getAddress();