mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
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
This commit is contained in:
commit
c8b62c7de3
1 changed files with 11 additions and 0 deletions
|
@ -1260,6 +1260,17 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
||||||
return false;
|
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)
|
if (nVersion < MIN_PEER_PROTO_VERSION)
|
||||||
{
|
{
|
||||||
// disconnect from peers older than this proto version
|
// disconnect from peers older than this proto version
|
||||||
|
|
Loading…
Reference in a new issue