mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Change GetBlocksDir() to ArgsManager.GetBlocksDirPath().
This commit is contained in:
parent
83292e2a70
commit
b4190eff72
5 changed files with 43 additions and 40 deletions
|
|
@ -637,7 +637,7 @@ static void CleanupBlockRevFiles()
|
|||
// Remove the rev files immediately and insert the blk file paths into an
|
||||
// ordered map keyed by block file index.
|
||||
LogPrintf("Removing unusable blk?????.dat and rev?????.dat files for -reindex with -prune\n");
|
||||
fs::path blocksdir = GetBlocksDir();
|
||||
fs::path blocksdir = gArgs.GetBlocksDirPath();
|
||||
for (fs::directory_iterator it(blocksdir); it != fs::directory_iterator(); it++) {
|
||||
if (fs::is_regular_file(*it) &&
|
||||
it->path().filename().string().length() == 12 &&
|
||||
|
|
@ -919,7 +919,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
|
|||
InitWarning(warnings);
|
||||
}
|
||||
|
||||
if (!fs::is_directory(GetBlocksDir())) {
|
||||
if (!fs::is_directory(gArgs.GetBlocksDirPath())) {
|
||||
return InitError(strprintf(_("Specified blocks directory \"%s\" does not exist."), args.GetArg("-blocksdir", "")));
|
||||
}
|
||||
|
||||
|
|
@ -1759,8 +1759,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
InitError(strprintf(_("Error: Disk space is low for %s"), GetDataDir()));
|
||||
return false;
|
||||
}
|
||||
if (!CheckDiskSpace(GetBlocksDir())) {
|
||||
InitError(strprintf(_("Error: Disk space is low for %s"), GetBlocksDir()));
|
||||
if (!CheckDiskSpace(gArgs.GetBlocksDirPath())) {
|
||||
InitError(strprintf(_("Error: Disk space is low for %s"), gArgs.GetBlocksDirPath()));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue