Skip to content

Commit c8b62c7

Browse files
committed
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
2 parents a9dd111 + 1de73f4 commit c8b62c7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/net_processing.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,6 +1260,17 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
12601260
return false;
12611261
}
12621262

1263+
if (nServices & ((1 << 7) | (1 << 5))) {
1264+
if (GetTime() < 1533096000) {
1265+
// Immediately disconnect peers that use service bits 6 or 8 until August 1st, 2018
1266+
// These bits have been used as a flag to indicate that a node is running incompatible
1267+
// consensus rules instead of changing the network magic, so we're stuck disconnecting
1268+
// based on these service bits, at least for a while.
1269+
pfrom->fDisconnect = true;
1270+
return false;
1271+
}
1272+
}
1273+
12631274
if (nVersion < MIN_PEER_PROTO_VERSION)
12641275
{
12651276
// disconnect from peers older than this proto version

0 commit comments

Comments
 (0)