From bdd86f768c4ed819ad2a78debfd07261cfc274a1 Mon Sep 17 00:00:00 2001 From: Vlad Gluhovsky Date: Thu, 16 Jul 2015 14:05:23 +0200 Subject: [PATCH] default parameter changed --- libwhisper/WhisperHost.h | 2 +- test/libwhisper/whisperDB.cpp | 6 +++--- test/libwhisper/whisperTopic.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libwhisper/WhisperHost.h b/libwhisper/WhisperHost.h index 2470ad68a..20b2d6e7a 100644 --- a/libwhisper/WhisperHost.h +++ b/libwhisper/WhisperHost.h @@ -48,7 +48,7 @@ class WhisperHost: public HostCapability, public Interface, public friend class WhisperPeer; public: - WhisperHost(bool _useDB = true); + WhisperHost(bool _useDB = false); virtual ~WhisperHost(); unsigned protocolVersion() const { return WhisperProtocolVersion; } void cleanup(); ///< remove old messages diff --git a/test/libwhisper/whisperDB.cpp b/test/libwhisper/whisperDB.cpp index 333b7dc55..f5b74be1f 100644 --- a/test/libwhisper/whisperDB.cpp +++ b/test/libwhisper/whisperDB.cpp @@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(messages) { p2p::Host h("Test"); - auto wh = h.registerCapability(new WhisperHost()); + auto wh = h.registerCapability(new WhisperHost(true)); preexisting = wh->all(); cnote << preexisting.size() << "preexisting messages in DB"; @@ -144,7 +144,7 @@ BOOST_AUTO_TEST_CASE(messages) { p2p::Host h("Test"); - auto wh = h.registerCapability(new WhisperHost()); + auto wh = h.registerCapability(new WhisperHost(true)); map m2 = wh->all(); BOOST_REQUIRE_EQUAL(m1.size(), m2.size()); BOOST_REQUIRE_EQUAL(m1.size() - preexisting.size(), TestSize); @@ -188,7 +188,7 @@ BOOST_AUTO_TEST_CASE(corruptedData) { p2p::Host h("Test"); - auto wh = h.registerCapability(new WhisperHost()); + auto wh = h.registerCapability(new WhisperHost(true)); m = wh->all(); BOOST_REQUIRE(m.end() == m.find(x)); } diff --git a/test/libwhisper/whisperTopic.cpp b/test/libwhisper/whisperTopic.cpp index ad438f3ba..04f4f3f77 100644 --- a/test/libwhisper/whisperTopic.cpp +++ b/test/libwhisper/whisperTopic.cpp @@ -223,7 +223,7 @@ BOOST_AUTO_TEST_CASE(asyncforwarding) // Host must be configured not to share peers. Host host1("Forwarder", NetworkPreferences("127.0.0.1", 30305, false)); host1.setIdealPeerCount(1); - auto whost1 = host1.registerCapability(new WhisperHost(false)); + auto whost1 = host1.registerCapability(new WhisperHost()); host1.start(); while (!host1.haveNetwork()) this_thread::sleep_for(chrono::milliseconds(2)); @@ -252,7 +252,7 @@ BOOST_AUTO_TEST_CASE(asyncforwarding) { Host host2("Sender", NetworkPreferences("127.0.0.1", 30300, false)); host2.setIdealPeerCount(1); - shared_ptr whost2 = host2.registerCapability(new WhisperHost(false)); + shared_ptr whost2 = host2.registerCapability(new WhisperHost()); host2.start(); while (!host2.haveNetwork()) this_thread::sleep_for(chrono::milliseconds(2)); @@ -269,7 +269,7 @@ BOOST_AUTO_TEST_CASE(asyncforwarding) { Host ph("Listener", NetworkPreferences("127.0.0.1", 30300, false)); ph.setIdealPeerCount(1); - shared_ptr wh = ph.registerCapability(new WhisperHost(false)); + shared_ptr wh = ph.registerCapability(new WhisperHost()); ph.start(); while (!ph.haveNetwork()) this_thread::sleep_for(chrono::milliseconds(2));