aboutsummaryrefslogtreecommitdiffstats
path: root/whisperTopic.cpp
diff options
context:
space:
mode:
authorwinsvega <winsvega@mail.ru>2015-02-10 18:19:27 +0800
committerwinsvega <winsvega@mail.ru>2015-02-10 18:19:27 +0800
commit30db15c1a9933972f0ad0236e50bc967ebf24dd3 (patch)
tree3ca08f951f2dee908dce70271c984d32c30d0adc /whisperTopic.cpp
parentc09b7885e88b842a024e6b8a2e6cf5fd5d845ab3 (diff)
parent8f9511c6ec3a7df05188e9aa6322b5ec0932c095 (diff)
downloaddexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar
dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.gz
dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.bz2
dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.lz
dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.xz
dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.zst
dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.zip
Merge branch 'develop' of https://github.com/ethereum/cpp-ethereum into develop
Diffstat (limited to 'whisperTopic.cpp')
-rw-r--r--whisperTopic.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/whisperTopic.cpp b/whisperTopic.cpp
index 0162124b..11937336 100644
--- a/whisperTopic.cpp
+++ b/whisperTopic.cpp
@@ -50,6 +50,7 @@ BOOST_AUTO_TEST_CASE(topic)
auto w = wh->installWatch(BuildTopicMask("odd"));
started = true;
+ set<unsigned> received;
for (int iterout = 0, last = 0; iterout < 200 && last < 81; ++iterout)
{
@@ -57,6 +58,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;
}