aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-04-02 16:32:09 +0200
committerJon Atack <jon@atack.com>2021-05-12 16:13:32 +0200
commit7075f604e8d0b21b2255fa57e20cd365dc10a288 (patch)
treee1c8b36e98f2bff2464c8cc3c86b3b475c6fdd4e
parenta95540cf435029f06e56749802d71315ca76b0dd (diff)
scripted-diff: update noban documentation in net_processing.cpp
-BEGIN VERIFY SCRIPT- s() { git grep -l "$1" src/net_processing.cpp | xargs sed -i "s/$1/$2/g"; } s 'the noban permission' 'NetPermissionFlags::NoBan permission' s 'the NOBAN permission flag' 'NetPermissionFlags::NoBan permission' s 'noban permission' 'NetPermissionFlags::NoBan permission' -END VERIFY SCRIPT-
-rw-r--r--src/net_processing.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index f6d02f0314..fdd36835c2 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -124,11 +124,11 @@ static constexpr auto AVG_LOCAL_ADDRESS_BROADCAST_INTERVAL = 24h;
/** Average delay between peer address broadcasts */
static constexpr auto AVG_ADDRESS_BROADCAST_INTERVAL = 30s;
/** Average delay between trickled inventory transmissions for inbound peers.
- * Blocks and peers with noban permission bypass this. */
+ * Blocks and peers with NetPermissionFlags::NoBan permission bypass this. */
static constexpr auto INBOUND_INVENTORY_BROADCAST_INTERVAL = 5s;
/** Average delay between trickled inventory transmissions for outbound peers.
* Use a smaller delay as there is less privacy concern for them.
- * Blocks and peers with noban permission bypass this. */
+ * Blocks and peers with NetPermissionFlags::NoBan permission bypass this. */
static constexpr auto OUTBOUND_INVENTORY_BROADCAST_INTERVAL = 2s;
/** Maximum rate of inventory items to send per second.
* Limits the impact of low-fee transaction floods. */
@@ -183,7 +183,7 @@ struct Peer {
Mutex m_misbehavior_mutex;
/** Accumulated misbehavior score for this peer */
int m_misbehavior_score GUARDED_BY(m_misbehavior_mutex){0};
- /** Whether this peer should be disconnected and marked as discouraged (unless it has the noban permission). */
+ /** Whether this peer should be disconnected and marked as discouraged (unless it has NetPermissionFlags::NoBan permission). */
bool m_should_discourage GUARDED_BY(m_misbehavior_mutex){false};
/** Protects block inventory data members */
@@ -3826,7 +3826,7 @@ bool PeerManagerImpl::MaybeDiscourageAndDisconnect(CNode& pnode, Peer& peer)
} // peer.m_misbehavior_mutex
if (pnode.HasPermission(NetPermissionFlags::NoBan)) {
- // We never disconnect or discourage peers for bad behavior if they have the NOBAN permission flag
+ // We never disconnect or discourage peers for bad behavior if they have NetPermissionFlags::NoBan permission
LogPrintf("Warning: not punishing noban peer %d!\n", peer.m_id);
return false;
}
@@ -4620,7 +4620,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
// Detect whether this is a stalling initial-headers-sync peer
if (pindexBestHeader->GetBlockTime() <= GetAdjustedTime() - 24 * 60 * 60) {
if (current_time > state.m_headers_sync_timeout && nSyncStarted == 1 && (nPreferredDownload - state.fPreferredDownload >= 1)) {
- // Disconnect a peer (without the noban permission) if it is our only sync peer,
+ // Disconnect a peer (without NetPermissionFlags::NoBan permission) if it is our only sync peer,
// and we have others we could be using instead.
// Note: If all our peers are inbound, then we won't
// disconnect our sync peer for stalling; we have bigger