Remove old dead code
This commit is contained in:
27
src/init.cpp
27
src/init.cpp
@@ -1666,33 +1666,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
|
||||
fReindex = GetBoolArg("-reindex", false);
|
||||
|
||||
// Upgrading to 0.8; hard-link the old blknnnn.dat files into /blocks/
|
||||
boost::filesystem::path blocksDir = GetDataDir() / "blocks";
|
||||
if (!boost::filesystem::exists(blocksDir))
|
||||
{
|
||||
boost::filesystem::create_directories(blocksDir);
|
||||
bool linked = false;
|
||||
for (unsigned int i = 1; i < 10000; i++) {
|
||||
boost::filesystem::path source = GetDataDir() / strprintf("blk%04u.dat", i);
|
||||
if (!boost::filesystem::exists(source)) break;
|
||||
boost::filesystem::path dest = blocksDir / strprintf("blk%05u.dat", i-1);
|
||||
try {
|
||||
boost::filesystem::create_hard_link(source, dest);
|
||||
LogPrintf("Hardlinked %s -> %s\n", source.string(), dest.string());
|
||||
linked = true;
|
||||
} catch (const boost::filesystem::filesystem_error& e) {
|
||||
// Note: hardlink creation failing is not a disaster, it just means
|
||||
// blocks will get re-downloaded from peers.
|
||||
LogPrintf("Error hardlinking blk%04u.dat: %s\n", i, e.what());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (linked)
|
||||
{
|
||||
fReindex = true;
|
||||
}
|
||||
}
|
||||
|
||||
// block tree db settings
|
||||
int dbMaxOpenFiles = GetArg("-dbmaxopenfiles", DEFAULT_DB_MAX_OPEN_FILES);
|
||||
bool dbCompression = GetBoolArg("-dbcompression", DEFAULT_DB_COMPRESSION);
|
||||
|
||||
Reference in New Issue
Block a user