refactor: Remove redundant scope in BanMan::SweepBanned()

This commit is contained in:
Hennadii Stepanov 2022-05-20 15:20:42 +02:00
parent 52c0b3e859
commit ab75388320
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -183,7 +183,6 @@ void BanMan::SweepBanned()
int64_t now = GetTime();
bool notify_ui = false;
{
banmap_t::iterator it = m_banned.begin();
while (it != m_banned.end()) {
CSubNet sub_net = (*it).first;
@ -193,10 +192,11 @@ void BanMan::SweepBanned()
m_is_dirty = true;
notify_ui = true;
LogPrint(BCLog::NET, "Removed banned node address/subnet: %s\n", sub_net.ToString());
} else
} else {
++it;
}
}
// update UI
if (notify_ui && m_client_interface) {
m_client_interface->BannedListChanged();