mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-13 12:04:43 +02:00
refactor: Get rid of BanMan::BannedSetIsDirty()
This commit is contained in:
@ -53,7 +53,7 @@ void BanMan::DumpBanlist()
|
|||||||
{
|
{
|
||||||
LOCK(m_cs_banned);
|
LOCK(m_cs_banned);
|
||||||
SweepBanned();
|
SweepBanned();
|
||||||
if (!BannedSetIsDirty()) return;
|
if (!m_is_dirty) return;
|
||||||
banmap = m_banned;
|
banmap = m_banned;
|
||||||
SetBannedSetDirty(false);
|
SetBannedSetDirty(false);
|
||||||
}
|
}
|
||||||
@ -203,12 +203,6 @@ void BanMan::SweepBanned()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BanMan::BannedSetIsDirty()
|
|
||||||
{
|
|
||||||
LOCK(m_cs_banned);
|
|
||||||
return m_is_dirty;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BanMan::SetBannedSetDirty(bool dirty)
|
void BanMan::SetBannedSetDirty(bool dirty)
|
||||||
{
|
{
|
||||||
LOCK(m_cs_banned); //reuse m_banned lock for the m_is_dirty flag
|
LOCK(m_cs_banned); //reuse m_banned lock for the m_is_dirty flag
|
||||||
|
@ -81,7 +81,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void LoadBanlist() EXCLUSIVE_LOCKS_REQUIRED(!m_cs_banned);
|
void LoadBanlist() EXCLUSIVE_LOCKS_REQUIRED(!m_cs_banned);
|
||||||
bool BannedSetIsDirty();
|
|
||||||
//!set the "dirty" flag for the banlist
|
//!set the "dirty" flag for the banlist
|
||||||
void SetBannedSetDirty(bool dirty = true);
|
void SetBannedSetDirty(bool dirty = true);
|
||||||
//!clean unused entries (if bantime has expired)
|
//!clean unused entries (if bantime has expired)
|
||||||
|
Reference in New Issue
Block a user