mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
Move filtering banned addrs inside GetAddresses()
This commit is contained in:
@@ -3480,10 +3480,7 @@ void ProcessMessage(
|
||||
std::vector<CAddress> vAddr = connman.GetAddresses();
|
||||
FastRandomContext insecure_rand;
|
||||
for (const CAddress &addr : vAddr) {
|
||||
bool banned_or_discouraged = banman && (banman->IsDiscouraged(addr) || banman->IsBanned(addr));
|
||||
if (!banned_or_discouraged) {
|
||||
pfrom.PushAddress(addr, insecure_rand);
|
||||
}
|
||||
pfrom.PushAddress(addr, insecure_rand);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user