aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 7dec8fc1cf..f566af24c4 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2634,9 +2634,10 @@ void DumpBanlist()
CBanDB bandb;
banmap_t banmap;
+ CNode::SetBannedSetDirty(false);
CNode::GetBanned(banmap);
- if (bandb.Write(banmap))
- CNode::SetBannedSetDirty(false);
+ if (!bandb.Write(banmap))
+ CNode::SetBannedSetDirty(true);
LogPrint("net", "Flushed %d banned node ips/subnets to banlist.dat %dms\n",
banmap.size(), GetTimeMillis() - nStart);