mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Bypass headers anti-DoS checks for NoBan peers
This commit is contained in:
parent
132ed7eaaa
commit
e5982ecdc4
2 changed files with 33 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue