mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Move filtering banned addrs inside GetAddresses()
This commit is contained in:
parent
007e15dcd7
commit
ded742bc5b
2 changed files with 8 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue