refactor: Add thread safety annotation to BanMan::SweepBanned()

This commit is contained in:
Hennadii Stepanov
2022-05-20 15:17:00 +02:00
parent 3919059deb
commit 52c0b3e859
2 changed files with 3 additions and 2 deletions

View File

@@ -179,10 +179,11 @@ void BanMan::GetBanned(banmap_t& banmap)
void BanMan::SweepBanned()
{
AssertLockHeld(m_cs_banned);
int64_t now = GetTime();
bool notify_ui = false;
{
LOCK(m_cs_banned);
banmap_t::iterator it = m_banned.begin();
while (it != m_banned.end()) {
CSubNet sub_net = (*it).first;