From baa3b0c5cc8fd1cfb27e17f4b76e43b4bd38cc17 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Thu, 21 Apr 2016 18:35:27 -0700 Subject: [PATCH] Disable -peerbloomfilters by default in sidechains Removes Denial of Service risk on a network that will likely never have light wallets. User can enable it again if they reallly want it. --- src/init.cpp | 2 +- src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 2bb6015e5c..15b32078ba 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -979,7 +979,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // Option to startup with mocktime set (used for regression testing): SetMockTime(GetArg("-mocktime", 0)); // SetMockTime(0) is a no-op - if (GetBoolArg("-peerbloomfilters", DEFAULT_PEERBLOOMFILTERS)) + if (GetBoolArg("-peerbloomfilters", false)) nLocalServices = ServiceFlags(nLocalServices | NODE_BLOOM); nMaxTipAge = GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE); diff --git a/src/main.cpp b/src/main.cpp index 25e373adf2..03d30f9c2d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5184,7 +5184,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, LOCK(cs_main); Misbehaving(pfrom->GetId(), 100); return false; - } else { + } else if (GetBoolArg("-enforcenodebloom", true)) { pfrom->fDisconnect = true; return false; }