Merge 6ab84709fc into merged_master (Bitcoin PR bitcoin/bitcoin#25960)

This commit is contained in:
Byron Hambly 2024-11-25 15:18:26 +02:00
commit 13283a60b1
6 changed files with 47 additions and 22 deletions

View file

@ -2854,6 +2854,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.