Fix blocks dir references
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
This commit is contained in:
parent
76e68b04d0
commit
776da644eb
2 changed files with 2 additions and 2 deletions
|
@ -1621,7 +1621,7 @@ bool AppInitMain()
|
||||||
if (fReindex) {
|
if (fReindex) {
|
||||||
// remove old LevelDB indexes
|
// remove old LevelDB indexes
|
||||||
boost::system::error_code ec;
|
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() / "chainstate", ec);
|
||||||
fs::remove_all(GetDataDir() / "claimtrie", ec);
|
fs::remove_all(GetDataDir() / "claimtrie", ec);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4362,7 +4362,7 @@ bool LoadBlockIndex(const CChainParams& chainparams)
|
||||||
needs_init = g_chainstate.mapBlockIndex.empty();
|
needs_init = g_chainstate.mapBlockIndex.empty();
|
||||||
|
|
||||||
if (needs_init) {
|
if (needs_init) {
|
||||||
auto blockDir = GetDataDir() / "blocks";
|
auto& blockDir = GetBlocksDir();
|
||||||
for (auto it: fs::directory_iterator(blockDir)) {
|
for (auto it: fs::directory_iterator(blockDir)) {
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
if (fs::file_size(it, ec) > 100000000) {
|
if (fs::file_size(it, ec) > 100000000) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue