diff options
-rw-r--r-- | peer.cpp | 16 | ||||
-rw-r--r-- | whisperTopic.cpp | 2 |
2 files changed, 9 insertions, 9 deletions
@@ -49,14 +49,14 @@ int peerTest(int argc, char** argv) Host ph("Test", NetworkPreferences(listenPort)); if (!remoteHost.empty()) - ph.connect(remoteHost, remotePort); - - for (int i = 0; ; ++i) - { - this_thread::sleep_for(chrono::milliseconds(100)); - if (!(i % 10)) - ph.pingAll(); - } + ph.addNode(NodeId(), remoteHost, remotePort, remotePort); + +// for (int i = 0; ; ++i) +// { +// this_thread::sleep_for(chrono::milliseconds(100)); +// if (!(i % 10)) +// ph.keepAlivePeers(); +// } return 0; } diff --git a/whisperTopic.cpp b/whisperTopic.cpp index 79adf3d6..ea46b162 100644 --- a/whisperTopic.cpp +++ b/whisperTopic.cpp @@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE(topic) this_thread::sleep_for(chrono::milliseconds(500)); ph.start(); this_thread::sleep_for(chrono::milliseconds(500)); - ph.connect("127.0.0.1", 50303); + ph.addNode(NodeId(), "127.0.0.1", 50303, 50303); KeyPair us = KeyPair::create(); for (int i = 0; i < 10; ++i) |