@@ -1365,32 +1365,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
1365
1365
fReindex = GetBoolArg (" -reindex" , false );
1366
1366
bool fReindexChainState = GetBoolArg (" -reindex-chainstate" , false );
1367
1367
1368
- // Upgrading to 0.8; hard-link the old blknnnn.dat files into /blocks/
1369
- boost::filesystem::path blocksDir = GetDataDir () / " blocks" ;
1370
- if (!boost::filesystem::exists (blocksDir))
1371
- {
1372
- boost::filesystem::create_directories (blocksDir);
1373
- bool linked = false ;
1374
- for (unsigned int i = 1 ; i < 10000 ; i++) {
1375
- boost::filesystem::path source = GetDataDir () / strprintf (" blk%04u.dat" , i);
1376
- if (!boost::filesystem::exists (source)) break ;
1377
- boost::filesystem::path dest = blocksDir / strprintf (" blk%05u.dat" , i-1 );
1378
- try {
1379
- boost::filesystem::create_hard_link (source, dest);
1380
- LogPrintf (" Hardlinked %s -> %s\n " , source.string (), dest.string ());
1381
- linked = true ;
1382
- } catch (const boost::filesystem::filesystem_error& e) {
1383
- // Note: hardlink creation failing is not a disaster, it just means
1384
- // blocks will get re-downloaded from peers.
1385
- LogPrintf (" Error hardlinking blk%04u.dat: %s\n " , i, e.what ());
1386
- break ;
1387
- }
1388
- }
1389
- if (linked)
1390
- {
1391
- fReindex = true ;
1392
- }
1393
- }
1368
+ boost::filesystem::create_directories (GetDataDir () / " blocks" );
1394
1369
1395
1370
// cache size calculations
1396
1371
int64_t nTotalCache = (GetArg (" -dbcache" , nDefaultDbCache) << 20 );
0 commit comments