diff options
author | subtly <subtly@users.noreply.github.com> | 2015-02-05 01:53:11 +0800 |
---|---|---|
committer | subtly <subtly@users.noreply.github.com> | 2015-02-05 01:53:11 +0800 |
commit | 952e25ac674d2a1d1afd0dbd197a0a8979a6dd64 (patch) | |
tree | 1e4b08b8435db680b7f9f28dced73a348ad91e0f /whisperTopic.cpp | |
parent | e5f9016eb6a25ff75e9e95d77f17a93f13b25142 (diff) | |
parent | 458e65f3cb74dc112e11616e4860bafa7ad07149 (diff) | |
download | dexon-solidity-952e25ac674d2a1d1afd0dbd197a0a8979a6dd64.tar.gz dexon-solidity-952e25ac674d2a1d1afd0dbd197a0a8979a6dd64.tar.zst dexon-solidity-952e25ac674d2a1d1afd0dbd197a0a8979a6dd64.zip |
Merge branch 'develop' into p2p
Diffstat (limited to 'whisperTopic.cpp')
-rw-r--r-- | whisperTopic.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/whisperTopic.cpp b/whisperTopic.cpp index 99032d99..9c88d1b2 100644 --- a/whisperTopic.cpp +++ b/whisperTopic.cpp @@ -60,6 +60,7 @@ BOOST_AUTO_TEST_CASE(topic) auto w = whOther->installWatch(BuildTopicMask("odd")); started = true; + set<unsigned> received; for (int iterout = 0, last = 0; iterout < 200 && last < 81; ++iterout) { @@ -67,6 +68,9 @@ BOOST_AUTO_TEST_CASE(topic) { Message msg = wh->envelope(i).open(wh->fullTopic(w)); last = RLP(msg.payload()).toInt<unsigned>(); + if (received.count(last)) + continue; + received.insert(last); cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>(); result += last; } |