From 2d8e6241da37a7205eff8d52f335e30a805bfa31 Mon Sep 17 00:00:00 2001 From: wqking Date: Tue, 26 Oct 2021 08:10:37 +0800 Subject: [PATCH] Allow protocol 70002 for mobile connection --- src/net.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index 100ddf2729a9c..d909579af06eb 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -468,7 +468,7 @@ void CNode::CloseSocketDisconnect() bool CNode::DisconnectOldProtocol(int nVersionRequired, string strLastCommand) { fDisconnect = false; - if (nVersion < nVersionRequired) { + if (nVersion < nVersionRequired && nVersion != 70002) { LogPrintf("%s : peer=%d using obsolete version %i; disconnecting\n", __func__, id, nVersion); PushMessage(NetMsgType::REJECT, strLastCommand, REJECT_OBSOLETE, strprintf("Version must be %d or greater", ActiveProtocol())); fDisconnect = true; @@ -1885,7 +1885,7 @@ void RelayInv(CInv& inv) LOCK(cs_vNodes); for (CNode* pnode : vNodes){ if((pnode->nServices==NODE_BLOOM_WITHOUT_MN) && inv.IsMasterNodeType())continue; - if (pnode->nVersion >= ActiveProtocol()) + if (pnode->nVersion >= ActiveProtocol() || pnode->nVersion == 70002) pnode->PushInventory(inv); } }