Fix blocks dir references

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
This commit is contained in:
Anthony Fieroni 2020-02-04 18:30:25 +02:00
parent 76e68b04d0
commit 776da644eb
2 changed files with 2 additions and 2 deletions

View file

@ -1621,7 +1621,7 @@ bool AppInitMain()
if (fReindex) {
// remove old LevelDB indexes
boost::system::error_code ec;
fs::remove_all(GetDataDir() / "blocks" / "index", ec);
fs::remove_all(GetBlocksDir() / "index", ec);
fs::remove_all(GetDataDir() / "chainstate", ec);
fs::remove_all(GetDataDir() / "claimtrie", ec);
}

View file

@ -4362,7 +4362,7 @@ bool LoadBlockIndex(const CChainParams& chainparams)
needs_init = g_chainstate.mapBlockIndex.empty();
if (needs_init) {
auto blockDir = GetDataDir() / "blocks";
auto& blockDir = GetBlocksDir();
for (auto it: fs::directory_iterator(blockDir)) {
boost::system::error_code ec;
if (fs::file_size(it, ec) > 100000000) {