|
|
@ -1211,6 +1211,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|
|
|
int nVersion;
|
|
|
|
int nVersion;
|
|
|
|
int nSendVersion;
|
|
|
|
int nSendVersion;
|
|
|
|
std::string strSubVer;
|
|
|
|
std::string strSubVer;
|
|
|
|
|
|
|
|
std::string cleanSubVer;
|
|
|
|
int nStartingHeight = -1;
|
|
|
|
int nStartingHeight = -1;
|
|
|
|
bool fRelay = true;
|
|
|
|
bool fRelay = true;
|
|
|
|
|
|
|
|
|
|
|
@ -1246,6 +1247,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|
|
|
vRecv >> addrFrom >> nNonce;
|
|
|
|
vRecv >> addrFrom >> nNonce;
|
|
|
|
if (!vRecv.empty()) {
|
|
|
|
if (!vRecv.empty()) {
|
|
|
|
vRecv >> LIMITED_STRING(strSubVer, MAX_SUBVERSION_LENGTH);
|
|
|
|
vRecv >> LIMITED_STRING(strSubVer, MAX_SUBVERSION_LENGTH);
|
|
|
|
|
|
|
|
cleanSubVer = SanitizeString(strSubVer);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!vRecv.empty()) {
|
|
|
|
if (!vRecv.empty()) {
|
|
|
|
vRecv >> nStartingHeight;
|
|
|
|
vRecv >> nStartingHeight;
|
|
|
@ -1273,8 +1275,11 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|
|
|
|
|
|
|
|
|
|
|
pfrom->nServices = nServices;
|
|
|
|
pfrom->nServices = nServices;
|
|
|
|
pfrom->addrLocal = addrMe;
|
|
|
|
pfrom->addrLocal = addrMe;
|
|
|
|
pfrom->strSubVer = strSubVer;
|
|
|
|
{
|
|
|
|
pfrom->cleanSubVer = SanitizeString(strSubVer);
|
|
|
|
LOCK(pfrom->cs_SubVer);
|
|
|
|
|
|
|
|
pfrom->strSubVer = strSubVer;
|
|
|
|
|
|
|
|
pfrom->cleanSubVer = cleanSubVer;
|
|
|
|
|
|
|
|
}
|
|
|
|
pfrom->nStartingHeight = nStartingHeight;
|
|
|
|
pfrom->nStartingHeight = nStartingHeight;
|
|
|
|
pfrom->fClient = !(nServices & NODE_NETWORK);
|
|
|
|
pfrom->fClient = !(nServices & NODE_NETWORK);
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1330,7 +1335,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|
|
|
remoteAddr = ", peeraddr=" + pfrom->addr.ToString();
|
|
|
|
remoteAddr = ", peeraddr=" + pfrom->addr.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d%s\n",
|
|
|
|
LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d%s\n",
|
|
|
|
pfrom->cleanSubVer, pfrom->nVersion,
|
|
|
|
cleanSubVer, pfrom->nVersion,
|
|
|
|
pfrom->nStartingHeight, addrMe.ToString(), pfrom->id,
|
|
|
|
pfrom->nStartingHeight, addrMe.ToString(), pfrom->id,
|
|
|
|
remoteAddr);
|
|
|
|
remoteAddr);
|
|
|
|
|
|
|
|
|
|
|
|