aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-08-07 08:49:36 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-08-07 08:49:56 +0200
commitc8b62c7de3d428f5042530206c42fbb9fc897fec (patch)
tree642a02c8438d6a4a2aa88690e4e223b0ee0a625f
parenta9dd11144152bf40fa797cc0b0c8857c03d3ad6a (diff)
parent1de73f4e19fe789abb636afdb48a165a6fd31009 (diff)
Merge #10982: Disconnect network service bits 6 and 8 until Aug 1, 2018
1de73f4 Disconnect network service bits 6 and 8 until Aug 1, 2018 (Matt Corallo) Pull request description: Immediately disconnect peers that use service bits 6 and 8 until August 1st, 2018 These bits have been used as a flag to indicate that a node is running incompatible consensus rules instead of changing the network magic, so we're stuck disconnecting based on the service bits, at least for a while. Staying connected to nodes on other networks only prevents both sides from reaching consensus quickly, wastes network resources on both sides, etc. Didn't add constants to protocol.h as the code there notes that "service bits should be allocated via the BIP process". Tree-SHA512: 2d887774fcf20357019ffc2a8398464c76c1cff2c4e448c92bd5f391d630312301977fea841e0534df6641c7c5547605a5aad82859c59c4bd68be865e6d5a4c6
-rw-r--r--src/net_processing.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index a743f04dd1..6fabfcf0ad 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1260,6 +1260,17 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
return false;
}
+ if (nServices & ((1 << 7) | (1 << 5))) {
+ if (GetTime() < 1533096000) {
+ // Immediately disconnect peers that use service bits 6 or 8 until August 1st, 2018
+ // These bits have been used as a flag to indicate that a node is running incompatible
+ // consensus rules instead of changing the network magic, so we're stuck disconnecting
+ // based on these service bits, at least for a while.
+ pfrom->fDisconnect = true;
+ return false;
+ }
+ }
+
if (nVersion < MIN_PEER_PROTO_VERSION)
{
// disconnect from peers older than this proto version