mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Bypass headers anti-DoS checks for NoBan peers
This commit is contained in:
@@ -2820,6 +2820,13 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
|
||||
}
|
||||
}
|
||||
|
||||
// If our peer has NetPermissionFlags::NoBan privileges, then bypass our
|
||||
// anti-DoS logic (this saves bandwidth when we connect to a trusted peer
|
||||
// on startup).
|
||||
if (pfrom.HasPermission(NetPermissionFlags::NoBan)) {
|
||||
already_validated_work = true;
|
||||
}
|
||||
|
||||
// At this point, the headers connect to something in our block index.
|
||||
// Do anti-DoS checks to determine if we should process or store for later
|
||||
// processing.
|
||||
|
||||
Reference in New Issue
Block a user