banlist (bugfix): allow CNode::SweepBanned() to run on interval
- allows CNode::SweepBanned() to run, even if !CNode::BannedSetIsDirty(), because if nBanUntil is over we want the ban to be disabled for these nodes
This commit is contained in:
1 parent
2977c243ef
commit
e8600c924d
1 file changed
+5
-3
+5
-3
@@ -1455,8 +1455,6 @@ void DumpAddresses()
|
||||
void DumpData()
|
||||
{
|
||||
DumpAddresses();
|
||||
|
||||
if (CNode::BannedSetIsDirty())
|
||||
DumpBanlist();
|
||||
}
|
||||
|
||||
@@ -2487,9 +2485,13 @@ bool CBanDB::Read(banmap_t& banSet)
|
||||
|
||||
void DumpBanlist()
|
||||
{
|
||||
int64_t nStart = GetTimeMillis();
|
||||
CNode::SweepBanned(); // clean unused entries (if bantime has expired)
|
||||
|
||||
if (!CNode::BannedSetIsDirty())
|
||||
return;
|
||||
|
||||
int64_t nStart = GetTimeMillis();
|
||||
|
||||
CBanDB bandb;
|
||||
banmap_t banmap;
|
||||
CNode::GetBanned(banmap);
|
||||
|
||||
Reference in new issue
Block a user