mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 19:23:26 -03:00
peers.dat, banlist.dat recreated when missing
This commit is contained in:
parent
196ad6913f
commit
c77c6625f3
1 changed files with 7 additions and 2 deletions
|
@ -1941,8 +1941,10 @@ void StartNode(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||||
CAddrDB adb;
|
CAddrDB adb;
|
||||||
if (adb.Read(addrman))
|
if (adb.Read(addrman))
|
||||||
LogPrintf("Loaded %i addresses from peers.dat %dms\n", addrman.size(), GetTimeMillis() - nStart);
|
LogPrintf("Loaded %i addresses from peers.dat %dms\n", addrman.size(), GetTimeMillis() - nStart);
|
||||||
else
|
else {
|
||||||
LogPrintf("Invalid or missing peers.dat; recreating\n");
|
LogPrintf("Invalid or missing peers.dat; recreating\n");
|
||||||
|
DumpAddresses();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uiInterface.InitMessage(_("Loading banlist..."));
|
uiInterface.InitMessage(_("Loading banlist..."));
|
||||||
|
@ -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",
|
LogPrint("net", "Loaded %d banned node ips/subnets from banlist.dat %dms\n",
|
||||||
banmap.size(), GetTimeMillis() - nStart);
|
banmap.size(), GetTimeMillis() - nStart);
|
||||||
} else
|
} else {
|
||||||
LogPrintf("Invalid or missing banlist.dat; recreating\n");
|
LogPrintf("Invalid or missing banlist.dat; recreating\n");
|
||||||
|
CNode::SetBannedSetDirty(true); // force write
|
||||||
|
DumpBanlist();
|
||||||
|
}
|
||||||
|
|
||||||
fAddressesInitialized = true;
|
fAddressesInitialized = true;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue