diff options
author | Kiminuo <kiminuo@protonmail.com> | 2021-05-04 13:00:25 +0200 |
---|---|---|
committer | Kiminuo <kiminuo@protonmail.com> | 2021-05-24 10:29:58 +0200 |
commit | 4c3a5dcbfc3010965332ad568c3a70618c930ef3 (patch) | |
tree | 654ca8d0dba267bfae1c2edebce930629dda4e45 /src/init.cpp | |
parent | 13bd8bb0536f008118b1de921654925ed9ce1da7 (diff) |
scripted-diff: Replace `GetDataDir()` calls with `gArgs.GetDataDirNet()` calls
-BEGIN VERIFY SCRIPT-
git ls-files -- 'src' ':(exclude)src/util/system.h' ':(exclude)src/util/system.cpp' | xargs sed -i 's/GetDataDir()/gArgs.GetDataDirNet()/g';
-END VERIFY SCRIPT-
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp index 89e152e56f..593128747e 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1015,7 +1015,7 @@ bool AppInitParameterInteraction(const ArgsManager& args) static bool LockDataDirectory(bool probeOnly) { // Make sure only a single Bitcoin process is using the data directory. - fs::path datadir = GetDataDir(); + fs::path datadir = gArgs.GetDataDirNet(); if (!DirIsWritable(datadir)) { return InitError(strprintf(_("Cannot write to data directory '%s'; check permissions."), datadir.string())); } @@ -1166,7 +1166,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) assert(!node.addrman); node.addrman = std::make_unique<CAddrMan>(); assert(!node.banman); - node.banman = std::make_unique<BanMan>(GetDataDir() / "banlist.dat", &uiInterface, args.GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME)); + node.banman = std::make_unique<BanMan>(gArgs.GetDataDirNet() / "banlist.dat", &uiInterface, args.GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME)); assert(!node.connman); node.connman = std::make_unique<CConnman>(GetRand(std::numeric_limits<uint64_t>::max()), GetRand(std::numeric_limits<uint64_t>::max()), *node.addrman, args.GetBoolArg("-networkactive", true)); @@ -1276,7 +1276,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) asmap_path = DEFAULT_ASMAP_FILENAME; } if (!asmap_path.is_absolute()) { - asmap_path = GetDataDir() / asmap_path; + asmap_path = gArgs.GetDataDirNet() / asmap_path; } if (!fs::exists(asmap_path)) { InitError(strprintf(_("Could not find asmap file %s"), asmap_path)); @@ -1600,8 +1600,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) // ********************************************************* Step 11: import blocks - if (!CheckDiskSpace(GetDataDir())) { - InitError(strprintf(_("Error: Disk space is low for %s"), GetDataDir())); + if (!CheckDiskSpace(gArgs.GetDataDirNet())) { + InitError(strprintf(_("Error: Disk space is low for %s"), gArgs.GetDataDirNet())); return false; } if (!CheckDiskSpace(gArgs.GetBlocksDirPath())) { |