diff --git a/src/governance/governance.cpp b/src/governance/governance.cpp index a81becfe8b39b6..45ce85d9fc1b96 100644 --- a/src/governance/governance.cpp +++ b/src/governance/governance.cpp @@ -998,7 +998,7 @@ int CGovernanceManager::RequestGovernanceObjectVotes(Span vNodesCopy, CC // Don't try to sync any data from outbound non-relay "masternode" connections. // Inbound connection this early is most likely a "masternode" connection // initiated from another node, so skip it too. - if (!pnode->CanRelay() || (fMasternodeMode && pnode->fInbound)) continue; + if (!pnode->CanRelay() || (fMasternodeMode && pnode->IsInboundConn())) continue; // stop early to prevent setAskFor overflow { LOCK(cs_main); diff --git a/src/masternode/sync.cpp b/src/masternode/sync.cpp index 515d93cd0adc88..d3596d089df3d5 100644 --- a/src/masternode/sync.cpp +++ b/src/masternode/sync.cpp @@ -155,7 +155,7 @@ void CMasternodeSync::ProcessTick() // Don't try to sync any data from outbound non-relay "masternode" connections. // Inbound connection this early is most likely a "masternode" connection // initiated from another node, so skip it too. - if (!pnode->CanRelay() || (fMasternodeMode && pnode->fInbound)) continue; + if (!pnode->CanRelay() || (fMasternodeMode && pnode->IsInboundConn())) continue; { if ((pnode->HasPermission(PF_NOBAN) || pnode->m_manual_connection) && !netfulfilledman.HasFulfilledRequest(pnode->addr, strAllow)) { @@ -201,7 +201,7 @@ void CMasternodeSync::ProcessTick() // Now that the blockchain is synced request the mempool from the connected outbound nodes if possible for (auto pNodeTmp : vNodesCopy) { bool fRequestedEarlier = netfulfilledman.HasFulfilledRequest(pNodeTmp->addr, "mempool-sync"); - if (pNodeTmp->nVersion >= 70216 && !pNodeTmp->fInbound && !fRequestedEarlier && !pNodeTmp->IsBlockRelayOnly()) { + if (pNodeTmp->nVersion >= 70216 && !pNodeTmp->IsInboundConn() && !fRequestedEarlier && !pNodeTmp->IsBlockRelayOnly()) { netfulfilledman.AddFulfilledRequest(pNodeTmp->addr, "mempool-sync"); connman.PushMessage(pNodeTmp, msgMaker.Make(NetMsgType::MEMPOOL)); LogPrint(BCLog::MNSYNC, "CMasternodeSync::ProcessTick -- nTick %d nCurrentAsset %d -- syncing mempool from peer=%d\n", nTick, nCurrentAsset, pNodeTmp->GetId()); diff --git a/src/masternode/utils.cpp b/src/masternode/utils.cpp index a31d82d11cdc8a..ecb804e25fa739 100644 --- a/src/masternode/utils.cpp +++ b/src/masternode/utils.cpp @@ -30,7 +30,7 @@ void CMasternodeUtils::DoMaintenance(CConnman& connman, const CMasternodeSync& m // Don't disconnect masternode connections when we have less then the desired amount of outbound nodes int nonMasternodeCount = 0; connman.ForEachNode(CConnman::AllNodes, [&](CNode* pnode) { - if ((!pnode->fInbound && + if ((!pnode->IsInboundConn() && !pnode->fFeeler && !pnode->m_manual_connection && !pnode->m_masternode_connection && @@ -58,7 +58,7 @@ void CMasternodeUtils::DoMaintenance(CConnman& connman, const CMasternodeSync& m return; } // keep _verified_ inbound connections - if (pnode->fInbound) { + if (pnode->IsInboundConn()) { return; } } else if (GetSystemTimeInSeconds() - pnode->nTimeConnected < 5) {