@@ -1675,32 +1675,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
1675
1675
fReindex = GetBoolArg (" -reindex" , false );
1676
1676
bool fReindexChainState = GetBoolArg (" -reindex-chainstate" , false );
1677
1677
1678
- // Upgrading to 0.8; hard-link the old blknnnn.dat files into /blocks/
1679
- boost::filesystem::path blocksDir = GetDataDir () / " blocks" ;
1680
- if (!boost::filesystem::exists (blocksDir))
1681
- {
1682
- boost::filesystem::create_directories (blocksDir);
1683
- bool linked = false ;
1684
- for (unsigned int i = 1 ; i < 10000 ; i++) {
1685
- boost::filesystem::path source = GetDataDir () / strprintf (" blk%04u.dat" , i);
1686
- if (!boost::filesystem::exists (source)) break ;
1687
- boost::filesystem::path dest = blocksDir / strprintf (" blk%05u.dat" , i-1 );
1688
- try {
1689
- boost::filesystem::create_hard_link (source, dest);
1690
- LogPrintf (" Hardlinked %s -> %s\n " , source.string (), dest.string ());
1691
- linked = true ;
1692
- } catch (const boost::filesystem::filesystem_error& e) {
1693
- // Note: hardlink creation failing is not a disaster, it just means
1694
- // blocks will get re-downloaded from peers.
1695
- LogPrintf (" Error hardlinking blk%04u.dat: %s\n " , i, e.what ());
1696
- break ;
1697
- }
1698
- }
1699
- if (linked)
1700
- {
1701
- fReindex = true ;
1702
- }
1703
- }
1678
+ boost::filesystem::create_directories (GetDataDir () / " blocks" );
1704
1679
1705
1680
// cache size calculations
1706
1681
int64_t nTotalCache = (GetArg (" -dbcache" , nDefaultDbCache) << 20 );
0 commit comments