File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -418,10 +418,10 @@ void CConnman::DumpBanlist()
418
418
419
419
CBanDB bandb;
420
420
banmap_t banmap;
421
- SetBannedSetDirty (false );
422
421
GetBanned (banmap);
423
- if (!bandb.Write (banmap))
424
- SetBannedSetDirty (true );
422
+ if (bandb.Write (banmap)) {
423
+ SetBannedSetDirty (false );
424
+ }
425
425
426
426
LogPrint (BCLog::NET, " Flushed %d banned node ips/subnets to banlist.dat %dms\n " ,
427
427
banmap.size (), GetTimeMillis () - nStart);
@@ -541,6 +541,8 @@ bool CConnman::Unban(const CSubNet &subNet) {
541
541
void CConnman::GetBanned (banmap_t &banMap)
542
542
{
543
543
LOCK (cs_setBanned);
544
+ // Sweep the banlist so expired bans are not returned
545
+ SweepBanned ();
544
546
banMap = setBanned; // create a thread safe copy
545
547
}
546
548
You can’t perform that action at this time.
0 commit comments