mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 18:09:47 +01:00
Avoid calling BanMan::SweepBanned() twice in a row
This commit is contained in:
parent
33bda6ab87
commit
83c7646715
@ -43,16 +43,15 @@ void BanMan::DumpBanlist()
|
||||
static Mutex dump_mutex;
|
||||
LOCK(dump_mutex);
|
||||
|
||||
banmap_t banmap;
|
||||
{
|
||||
LOCK(m_cs_banned);
|
||||
SweepBanned();
|
||||
if (!BannedSetIsDirty()) return;
|
||||
banmap = m_banned;
|
||||
}
|
||||
|
||||
int64_t n_start = GetTimeMillis();
|
||||
|
||||
banmap_t banmap;
|
||||
GetBanned(banmap);
|
||||
if (m_ban_db.Write(banmap)) {
|
||||
SetBannedSetDirty(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user