Only sync mempool from v0.15+ (proto 70216+) nodes

Old nodes aren't able to relay DSTXes properly
This commit is contained in:
UdjinM6 2020-02-03 10:36:04 +03:00
parent e018257983
commit e3120ebc3d

View File

@ -208,7 +208,7 @@ void CMasternodeSync::ProcessTick(CConnman& connman)
// INITIAL TIMEOUT // INITIAL TIMEOUT
if(nCurrentAsset == MASTERNODE_SYNC_WAITING) { if(nCurrentAsset == MASTERNODE_SYNC_WAITING) {
if(!pnode->fInbound && gArgs.GetBoolArg("-syncmempool", DEFAULT_SYNC_MEMPOOL) && !netfulfilledman.HasFulfilledRequest(pnode->addr, "mempool-sync")) { if(pnode->nVersion >= 70216 && !pnode->fInbound && gArgs.GetBoolArg("-syncmempool", DEFAULT_SYNC_MEMPOOL) && !netfulfilledman.HasFulfilledRequest(pnode->addr, "mempool-sync")) {
netfulfilledman.AddFulfilledRequest(pnode->addr, "mempool-sync"); netfulfilledman.AddFulfilledRequest(pnode->addr, "mempool-sync");
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MEMPOOL)); connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MEMPOOL));
LogPrintf("CMasternodeSync::ProcessTick -- nTick %d nCurrentAsset %d -- syncing mempool from peer=%d\n", nTick, nCurrentAsset, pnode->GetId()); LogPrintf("CMasternodeSync::ProcessTick -- nTick %d nCurrentAsset %d -- syncing mempool from peer=%d\n", nTick, nCurrentAsset, pnode->GetId());