aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatick Strateman <patrick.strateman@gmail.com>2015-11-24 01:51:53 -0800
committerPatick Strateman <patrick.strateman@gmail.com>2015-11-24 02:08:00 -0800
commit0f4dc53fd6a19a763922b4c3888ce6542c594e01 (patch)
tree24400d2ed11d9b0e932ed3e2483eee77be53c7f5
parentb3caa9b7fa7695e60fc4002229b77f43db8ded67 (diff)
Add enforcenodebloom option.
Previously peers which implement a protocol version less than NO_BLOOM_VERSION would not be disconnected for sending a filter command, regardless of the peerbloomfilter option. Many node operators do not wish to provide expensive bloom filtering for SPV clients, previously they had to cherry pick the commit which enabled the disconnect logic. The default should remain false until a sufficient percent of SPV clients have updated.
-rw-r--r--src/main.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fd5637a8cd..b0b58141a2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3997,12 +3997,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
if (pfrom->nVersion >= NO_BLOOM_VERSION) {
Misbehaving(pfrom->GetId(), 100);
return false;
+ } else if (GetBoolArg("-enforcenodebloom", false)) {
+ pfrom->fDisconnect = true;
+ return false;
}
- //TODO: Enable this after reasonable network upgrade
- //else {
- // pfrom->fDisconnect = true;
- // return false;
- //}
}