diff options
| author | nicolas.dorier <[email protected]> | 2019-06-21 11:42:04 +0900 |
|---|---|---|
| committer | nicolas.dorier <[email protected]> | 2019-08-11 11:33:28 +0900 |
| commit | d541fa391844f658bd7035659b5b16695733dd56 (patch) | |
| tree | 655966a9b458e463187e6bd9abad30e5c43bbaba /src/net.cpp | |
| parent | Do not disconnect peer for asking mempool if it has NO_BAN permission (diff) | |
| download | discoin-d541fa391844f658bd7035659b5b16695733dd56.tar.xz discoin-d541fa391844f658bd7035659b5b16695733dd56.zip | |
Replace the use of fWhitelisted by permission checks
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp index fb04650ed..0464a6e9e 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -526,7 +526,7 @@ void CNode::copyStats(CNodeStats &stats) X(mapRecvBytesPerMsgCmd); X(nRecvBytes); } - X(fWhitelisted); + X(m_legacyWhitelisted); X(m_permissionFlags); { LOCK(cs_feeFilter); @@ -812,7 +812,7 @@ bool CConnman::AttemptToEvictConnection() LOCK(cs_vNodes); for (const CNode* node : vNodes) { - if (node->fWhitelisted) + if (node->HasPermission(PF_NOBAN)) continue; if (!node->fInbound) continue; @@ -982,7 +982,7 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) { pnode->AddRef(); pnode->m_permissionFlags = permissionFlags; // If this flag is present, the user probably expect that RPC and QT report it as whitelisted (backward compatibility) - pnode->fWhitelisted = legacyWhitelisted; + pnode->m_legacyWhitelisted = legacyWhitelisted; pnode->m_prefer_evict = bannedlevel > 0; m_msgproc->InitializeNode(pnode); |