aboutsummaryrefslogtreecommitdiffstats
path: root/whisperTopic.cpp
diff options
context:
space:
mode:
authorsubtly <subtly@users.noreply.github.com>2015-01-23 08:50:33 +0800
committersubtly <subtly@users.noreply.github.com>2015-01-23 08:50:33 +0800
commitcc9a7cbb71aadd84cfb5a9687e5082d53004063e (patch)
treee451f9bdeebb7d5b09fdec458715e41d3a5fe0d8 /whisperTopic.cpp
parent64ea4a19590edb06a3a9d7f61f52b81ab7e09cbc (diff)
downloaddexon-solidity-cc9a7cbb71aadd84cfb5a9687e5082d53004063e.tar.gz
dexon-solidity-cc9a7cbb71aadd84cfb5a9687e5082d53004063e.tar.zst
dexon-solidity-cc9a7cbb71aadd84cfb5a9687e5082d53004063e.zip
update whisper test. move ports out of private ranges and specify ip address.
Diffstat (limited to 'whisperTopic.cpp')
-rw-r--r--whisperTopic.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/whisperTopic.cpp b/whisperTopic.cpp
index ea46b162..9f0f3463 100644
--- a/whisperTopic.cpp
+++ b/whisperTopic.cpp
@@ -36,15 +36,16 @@ BOOST_AUTO_TEST_CASE(topic)
auto oldLogVerbosity = g_logVerbosity;
g_logVerbosity = 0;
+ Host ph1("Test", NetworkPreferences(30303, "127.0.0.1", true, true));
+
bool started = false;
unsigned result = 0;
std::thread listener([&]()
{
setThreadName("other");
- Host ph("Test", NetworkPreferences(50303, "", false, true));
- auto wh = ph.registerCapability(new WhisperHost());
- ph.start();
+ auto wh = ph1.registerCapability(new WhisperHost());
+ ph1.start();
started = true;
@@ -67,12 +68,12 @@ BOOST_AUTO_TEST_CASE(topic)
while (!started)
this_thread::sleep_for(chrono::milliseconds(50));
- Host ph("Test", NetworkPreferences(50300, "", false, true));
+ Host ph("Test", NetworkPreferences(30300, "127.0.0.1", true, true));
auto wh = ph.registerCapability(new WhisperHost());
this_thread::sleep_for(chrono::milliseconds(500));
ph.start();
this_thread::sleep_for(chrono::milliseconds(500));
- ph.addNode(NodeId(), "127.0.0.1", 50303, 50303);
+ ph.addNode(ph1.id(), "127.0.0.1", 30303, 30303);
KeyPair us = KeyPair::create();
for (int i = 0; i < 10; ++i)