Skip to content

Commit

Permalink
peers.dat, banlist.dat recreated when missing
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkalx committed Feb 3, 2016
1 parent 196ad69 commit c77c662
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1941,8 +1941,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..."));
Expand All @@ -1957,8 +1959,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;

Expand Down

0 comments on commit c77c662

Please sign in to comment.