mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-18 02:51:06 +00:00
Merge #7959: fix race that could fail to persist a ban
f4ac02e fix race that could fail to persist a ban (Kaz Wesley)
This commit is contained in:
commit
03cf6e8675
@ -2634,9 +2634,10 @@ void DumpBanlist()
|
|||||||
|
|
||||||
CBanDB bandb;
|
CBanDB bandb;
|
||||||
banmap_t banmap;
|
banmap_t banmap;
|
||||||
|
CNode::SetBannedSetDirty(false);
|
||||||
CNode::GetBanned(banmap);
|
CNode::GetBanned(banmap);
|
||||||
if (bandb.Write(banmap))
|
if (!bandb.Write(banmap))
|
||||||
CNode::SetBannedSetDirty(false);
|
CNode::SetBannedSetDirty(true);
|
||||||
|
|
||||||
LogPrint("net", "Flushed %d banned node ips/subnets to banlist.dat %dms\n",
|
LogPrint("net", "Flushed %d banned node ips/subnets to banlist.dat %dms\n",
|
||||||
banmap.size(), GetTimeMillis() - nStart);
|
banmap.size(), GetTimeMillis() - nStart);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user