Browse Source

minor clean up

cl-refactor
Vlad Gluhovsky 10 years ago
parent
commit
6a3060c7b6
  1. 4
      libwhisper/WhisperPeer.h
  2. 6
      test/libwhisper/whisperTopic.cpp

4
libwhisper/WhisperPeer.h

@ -55,7 +55,7 @@ public:
static std::string name() { return "shh"; }
static u256 version() { return 2; }
static unsigned messageCount() { return PacketCount; }
FixedHash<TopicBloomFilterSize> const& bloom() const { return m_bloom; }
FixedHash<TopicBloomFilterSize> const& bloom() const { return m_bloom; }
void advertiseTopicsOfInterest(); ///< sends our bloom filter to remote peer
private:
@ -66,7 +66,7 @@ private:
mutable dev::Mutex x_unseen;
std::multimap<unsigned, h256> m_unseen; ///< Rated according to what they want.
std::chrono::system_clock::time_point m_timer = std::chrono::system_clock::now();
std::chrono::system_clock::time_point m_timer = std::chrono::system_clock::now();
FixedHash<TopicBloomFilterSize> m_bloom; ///< Peer's topics of interest
};

6
test/libwhisper/whisperTopic.cpp

@ -324,7 +324,7 @@ BOOST_AUTO_TEST_CASE(topicAdvertising)
host2.start();
while (!host2.haveNetwork())
this_thread::sleep_for(chrono::milliseconds(10));
this_thread::sleep_for(chrono::milliseconds(10));
host1.addNode(host2.id(), NodeIPEndpoint(bi::address::from_string("127.0.0.1"), 30305, 30305));
while (!host1.haveNetwork())
@ -344,7 +344,7 @@ BOOST_AUTO_TEST_CASE(topicAdvertising)
if (!sessions.empty() && sessions.back().first->cap<WhisperPeer>()->bloom())
break;
else
this_thread::sleep_for(chrono::milliseconds(10));
this_thread::sleep_for(chrono::milliseconds(10));
}
BOOST_REQUIRE(sessions.size());
@ -362,7 +362,7 @@ BOOST_AUTO_TEST_CASE(topicAdvertising)
if (!sessions.empty() && sessions.back().first->cap<WhisperPeer>()->bloom())
break;
else
this_thread::sleep_for(chrono::milliseconds(10));
this_thread::sleep_for(chrono::milliseconds(10));
}
BOOST_REQUIRE(sessions.size());

Loading…
Cancel
Save