Skip to content

Commit 7075f60

Browse files
committed
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-
1 parent a95540c commit 7075f60

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/net_processing.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ static constexpr auto AVG_LOCAL_ADDRESS_BROADCAST_INTERVAL = 24h;
124124
/** Average delay between peer address broadcasts */
125125
static constexpr auto AVG_ADDRESS_BROADCAST_INTERVAL = 30s;
126126
/** Average delay between trickled inventory transmissions for inbound peers.
127-
* Blocks and peers with noban permission bypass this. */
127+
* Blocks and peers with NetPermissionFlags::NoBan permission bypass this. */
128128
static constexpr auto INBOUND_INVENTORY_BROADCAST_INTERVAL = 5s;
129129
/** Average delay between trickled inventory transmissions for outbound peers.
130130
* Use a smaller delay as there is less privacy concern for them.
131-
* Blocks and peers with noban permission bypass this. */
131+
* Blocks and peers with NetPermissionFlags::NoBan permission bypass this. */
132132
static constexpr auto OUTBOUND_INVENTORY_BROADCAST_INTERVAL = 2s;
133133
/** Maximum rate of inventory items to send per second.
134134
* Limits the impact of low-fee transaction floods. */
@@ -183,7 +183,7 @@ struct Peer {
183183
Mutex m_misbehavior_mutex;
184184
/** Accumulated misbehavior score for this peer */
185185
int m_misbehavior_score GUARDED_BY(m_misbehavior_mutex){0};
186-
/** Whether this peer should be disconnected and marked as discouraged (unless it has the noban permission). */
186+
/** Whether this peer should be disconnected and marked as discouraged (unless it has NetPermissionFlags::NoBan permission). */
187187
bool m_should_discourage GUARDED_BY(m_misbehavior_mutex){false};
188188

189189
/** Protects block inventory data members */
@@ -3826,7 +3826,7 @@ bool PeerManagerImpl::MaybeDiscourageAndDisconnect(CNode& pnode, Peer& peer)
38263826
} // peer.m_misbehavior_mutex
38273827

38283828
if (pnode.HasPermission(NetPermissionFlags::NoBan)) {
3829-
// We never disconnect or discourage peers for bad behavior if they have the NOBAN permission flag
3829+
// We never disconnect or discourage peers for bad behavior if they have NetPermissionFlags::NoBan permission
38303830
LogPrintf("Warning: not punishing noban peer %d!\n", peer.m_id);
38313831
return false;
38323832
}
@@ -4620,7 +4620,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
46204620
// Detect whether this is a stalling initial-headers-sync peer
46214621
if (pindexBestHeader->GetBlockTime() <= GetAdjustedTime() - 24 * 60 * 60) {
46224622
if (current_time > state.m_headers_sync_timeout && nSyncStarted == 1 && (nPreferredDownload - state.fPreferredDownload >= 1)) {
4623-
// Disconnect a peer (without the noban permission) if it is our only sync peer,
4623+
// Disconnect a peer (without NetPermissionFlags::NoBan permission) if it is our only sync peer,
46244624
// and we have others we could be using instead.
46254625
// Note: If all our peers are inbound, then we won't
46264626
// disconnect our sync peer for stalling; we have bigger

0 commit comments

Comments
 (0)