aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsubtly <subtly@users.noreply.github.com>2015-02-09 13:35:25 +0800
committersubtly <subtly@users.noreply.github.com>2015-02-09 13:35:25 +0800
commit91f141f323b4142c14a39034061cf126d79518d0 (patch)
tree85723acf8cd1a6ad759007105869fb40c202d44e
parent270a2d70945b383dcf4683c723ee4081e0775bdc (diff)
downloaddexon-solidity-91f141f323b4142c14a39034061cf126d79518d0.tar.gz
dexon-solidity-91f141f323b4142c14a39034061cf126d79518d0.tar.zst
dexon-solidity-91f141f323b4142c14a39034061cf126d79518d0.zip
update for cr. update whisper test.
-rw-r--r--whisperTopic.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/whisperTopic.cpp b/whisperTopic.cpp
index ab0cdc11..be93174e 100644
--- a/whisperTopic.cpp
+++ b/whisperTopic.cpp
@@ -243,17 +243,20 @@ BOOST_AUTO_TEST_CASE(asyncforwarding)
});
while (!startedForwarder)
- this_thread::sleep_for(chrono::milliseconds(50));
-
- Host host2("Sender", NetworkPreferences(30300, "", false, true));
- host2.setIdealPeerCount(1);
- shared_ptr<WhisperHost> whost2 = host2.registerCapability(new WhisperHost());
- host2.start();
- while (!host2.isStarted())
this_thread::sleep_for(chrono::milliseconds(2));
- host2.addNode(host1.id(), "127.0.0.1", 30305, 30305);
{
+ Host host2("Sender", NetworkPreferences(30300, "", false, true));
+ host2.setIdealPeerCount(1);
+ shared_ptr<WhisperHost> whost2 = host2.registerCapability(new WhisperHost());
+ host2.start();
+ while (!host2.isStarted())
+ this_thread::sleep_for(chrono::milliseconds(2));
+ host2.addNode(host1.id(), "127.0.0.1", 30305, 30305);
+
+ while (!host2.peerCount())
+ this_thread::sleep_for(chrono::milliseconds(5));
+
KeyPair us = KeyPair::create();
whost2->post(us.sec(), RLPStream().append(1).out(), BuildTopic("test"));
this_thread::sleep_for(chrono::milliseconds(250));