@@ -124,11 +124,11 @@ static constexpr auto AVG_LOCAL_ADDRESS_BROADCAST_INTERVAL = 24h;
124
124
/* * Average delay between peer address broadcasts */
125
125
static constexpr auto AVG_ADDRESS_BROADCAST_INTERVAL = 30s;
126
126
/* * 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. */
128
128
static constexpr auto INBOUND_INVENTORY_BROADCAST_INTERVAL = 5s;
129
129
/* * Average delay between trickled inventory transmissions for outbound peers.
130
130
* 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. */
132
132
static constexpr auto OUTBOUND_INVENTORY_BROADCAST_INTERVAL = 2s;
133
133
/* * Maximum rate of inventory items to send per second.
134
134
* Limits the impact of low-fee transaction floods. */
@@ -183,7 +183,7 @@ struct Peer {
183
183
Mutex m_misbehavior_mutex;
184
184
/* * Accumulated misbehavior score for this peer */
185
185
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). */
187
187
bool m_should_discourage GUARDED_BY (m_misbehavior_mutex){false };
188
188
189
189
/* * Protects block inventory data members */
@@ -3826,7 +3826,7 @@ bool PeerManagerImpl::MaybeDiscourageAndDisconnect(CNode& pnode, Peer& peer)
3826
3826
} // peer.m_misbehavior_mutex
3827
3827
3828
3828
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
3830
3830
LogPrintf (" Warning: not punishing noban peer %d!\n " , peer.m_id );
3831
3831
return false ;
3832
3832
}
@@ -4620,7 +4620,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
4620
4620
// Detect whether this is a stalling initial-headers-sync peer
4621
4621
if (pindexBestHeader->GetBlockTime () <= GetAdjustedTime () - 24 * 60 * 60 ) {
4622
4622
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,
4624
4624
// and we have others we could be using instead.
4625
4625
// Note: If all our peers are inbound, then we won't
4626
4626
// disconnect our sync peer for stalling; we have bigger
0 commit comments