Permalink
Browse files

Merge #7458: [Net] peers.dat, banlist.dat recreated when missing

c77c662 peers.dat, banlist.dat recreated when missing (kirkalx)
  • Loading branch information...
laanwj committed Feb 4, 2016
2 parents eb33179 + c77c662 commit 898fedf42fdc23b80d3ccfe17f5a4c9bb74cde74
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/net.cpp
View
@@ -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;

0 comments on commit 898fedf

Please sign in to comment.