diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-02-04 08:52:09 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-02-04 08:54:21 +0100 |
commit | 898fedf42fdc23b80d3ccfe17f5a4c9bb74cde74 (patch) | |
tree | 232306bc6d9d89c4f2750d34c39f883b1bbc0650 /src | |
parent | eb331794a22b86da0a76d6710cb3eb37903a486e (diff) | |
parent | c77c6625f3fc88e461a9ec11672edb6a9d4cfd98 (diff) |
Merge #7458: [Net] peers.dat, banlist.dat recreated when missing
c77c662 peers.dat, banlist.dat recreated when missing (kirkalx)
Diffstat (limited to 'src')
-rw-r--r-- | src/net.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index 14e22f6cb3..5efe160c90 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1943,8 +1943,10 @@ void StartNode(boost::thread_group& threadGroup, CScheduler& scheduler) CAddrDB adb; if (adb.Read(addrman)) LogPrintf("Loaded %i addresses from peers.dat %dms\n", addrman.size(), GetTimeMillis() - nStart); - else + else { LogPrintf("Invalid or missing peers.dat; recreating\n"); + DumpAddresses(); + } } uiInterface.InitMessage(_("Loading banlist...")); @@ -1959,8 +1961,11 @@ void StartNode(boost::thread_group& threadGroup, CScheduler& scheduler) LogPrint("net", "Loaded %d banned node ips/subnets from banlist.dat %dms\n", banmap.size(), GetTimeMillis() - nStart); - } else + } else { LogPrintf("Invalid or missing banlist.dat; recreating\n"); + CNode::SetBannedSetDirty(true); // force write + DumpBanlist(); + } fAddressesInitialized = true; |