Browse Source

updated test p2p/host

cl-refactor
Vlad Gluhovsky 10 years ago
parent
commit
8074ed9350
  1. 2
      test/libp2p/peer.cpp

2
test/libp2p/peer.cpp

@ -57,12 +57,12 @@ BOOST_AUTO_TEST_CASE(host)
this_thread::sleep_for(chrono::milliseconds(step));
BOOST_REQUIRE(host1.isStarted() && host2.isStarted());
host1.addNode(node2, NodeIPEndpoint(bi::address::from_string("127.0.0.1"), host2prefs.listenPort, host2prefs.listenPort));
for (int i = 0; i < 3000 && (!host1.haveNetwork() || !host2.haveNetwork()); i += step)
this_thread::sleep_for(chrono::milliseconds(step));
BOOST_REQUIRE(host1.haveNetwork() && host2.haveNetwork());
host1.addNode(node2, NodeIPEndpoint(bi::address::from_string("127.0.0.1"), host2prefs.listenPort, host2prefs.listenPort));
for (int i = 0; i < 3000 && (!host1.peerCount() || !host2.peerCount()); i += step)
this_thread::sleep_for(chrono::milliseconds(step));

Loading…
Cancel
Save