Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSION
INIT_PROTO_VERSION is the initial version, after a succesful version/verack it is increased to a negotiated version. MIN_PEER_PROTO_VERSION could be a different value to disconnect from peers older than a specified version.
This commit is contained in:
@@ -3377,10 +3377,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
CAddress addrFrom;
|
||||
uint64 nNonce = 1;
|
||||
vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe;
|
||||
if (pfrom->nVersion < MIN_PROTO_VERSION)
|
||||
if (pfrom->nVersion < MIN_PEER_PROTO_VERSION)
|
||||
{
|
||||
// Since February 20, 2012, the protocol is initiated at version 209,
|
||||
// and earlier versions are no longer supported
|
||||
// disconnect from peers older than this proto version
|
||||
LogPrintf("partner %s using obsolete version %i; disconnecting\n", pfrom->addr.ToString().c_str(), pfrom->nVersion);
|
||||
pfrom->fDisconnect = true;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user