|
|
|
@ -2185,7 +2185,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
@@ -2185,7 +2185,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
|
|
|
|
CAddress addrFrom; |
|
|
|
|
uint64 nNonce = 1; |
|
|
|
|
vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe; |
|
|
|
|
if (pfrom->nVersion < 209) |
|
|
|
|
if (pfrom->nVersion < MIN_PROTO_VERSION) |
|
|
|
|
{ |
|
|
|
|
// Since February 20, 2012, the protocol is initiated at version 209,
|
|
|
|
|
// and earlier versions are no longer supported
|
|
|
|
@ -2235,7 +2235,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
@@ -2235,7 +2235,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Get recent addresses
|
|
|
|
|
if (pfrom->nVersion >= 31402 || addrman.size() < 1000) |
|
|
|
|
if (pfrom->nVersion >= CADDR_TIME_VERSION || addrman.size() < 1000) |
|
|
|
|
{ |
|
|
|
|
pfrom->PushMessage("getaddr"); |
|
|
|
|
pfrom->fGetAddr = true; |
|
|
|
@ -2252,7 +2252,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
@@ -2252,7 +2252,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
|
|
|
|
// Ask the first connected node for block updates
|
|
|
|
|
static int nAskedForBlocks = 0; |
|
|
|
|
if (!pfrom->fClient && |
|
|
|
|
(pfrom->nVersion < 32000 || pfrom->nVersion >= 32400) && |
|
|
|
|
(pfrom->nVersion < NOBLKS_VERSION_START || |
|
|
|
|
pfrom->nVersion >= NOBLKS_VERSION_END) && |
|
|
|
|
(nAskedForBlocks < 1 || vNodes.size() <= 1)) |
|
|
|
|
{ |
|
|
|
|
nAskedForBlocks++; |
|
|
|
@ -2294,7 +2295,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
@@ -2294,7 +2295,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
|
|
|
|
vRecv >> vAddr; |
|
|
|
|
|
|
|
|
|
// Don't want addr from older versions unless seeding
|
|
|
|
|
if (pfrom->nVersion < 31402 && addrman.size() > 1000) |
|
|
|
|
if (pfrom->nVersion < CADDR_TIME_VERSION && addrman.size() > 1000) |
|
|
|
|
return true; |
|
|
|
|
if (vAddr.size() > 1000) |
|
|
|
|
{ |
|
|
|
@ -2331,7 +2332,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
@@ -2331,7 +2332,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
|
|
|
|
multimap<uint256, CNode*> mapMix; |
|
|
|
|
BOOST_FOREACH(CNode* pnode, vNodes) |
|
|
|
|
{ |
|
|
|
|
if (pnode->nVersion < 31402) |
|
|
|
|
if (pnode->nVersion < CADDR_TIME_VERSION) |
|
|
|
|
continue; |
|
|
|
|
unsigned int nPointer; |
|
|
|
|
memcpy(&nPointer, &pnode, sizeof(nPointer)); |
|
|
|
|