diff --git a/test/libp2p/peer.cpp b/test/libp2p/peer.cpp index 5417450b4..807ccec6b 100644 --- a/test/libp2p/peer.cpp +++ b/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));