@@ -867,7 +867,7 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb
867867 InitWarning (warnings);
868868 }
869869
870- if (!fs::is_directory (gArgs .GetBlocksDirPath ())) {
870+ if (!fs::is_directory (args .GetBlocksDirPath ())) {
871871 return InitError (strprintf (_ (" Specified blocks directory \" %s\" does not exist." ), args.GetArg (" -blocksdir" , " " )));
872872 }
873873
@@ -1224,7 +1224,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
12241224 if (args.IsArgSet (" -asmap" )) {
12251225 fs::path asmap_path = args.GetPathArg (" -asmap" , DEFAULT_ASMAP_FILENAME);
12261226 if (!asmap_path.is_absolute ()) {
1227- asmap_path = gArgs .GetDataDirNet () / asmap_path;
1227+ asmap_path = args .GetDataDirNet () / asmap_path;
12281228 }
12291229 if (!fs::exists (asmap_path)) {
12301230 InitError (strprintf (_ (" Could not find asmap file %s" ), fs::quoted (fs::PathToString (asmap_path))));
@@ -1254,7 +1254,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
12541254 }
12551255
12561256 assert (!node.banman );
1257- node.banman = std::make_unique<BanMan>(gArgs .GetDataDirNet () / " banlist" , &uiInterface, args.GetIntArg (" -bantime" , DEFAULT_MISBEHAVING_BANTIME));
1257+ node.banman = std::make_unique<BanMan>(args .GetDataDirNet () / " banlist" , &uiInterface, args.GetIntArg (" -bantime" , DEFAULT_MISBEHAVING_BANTIME));
12581258 assert (!node.connman );
12591259 node.connman = std::make_unique<CConnman>(GetRand<uint64_t >(),
12601260 GetRand<uint64_t >(),
@@ -1618,12 +1618,12 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
16181618
16191619 // ********************************************************* Step 11: import blocks
16201620
1621- if (!CheckDiskSpace (gArgs .GetDataDirNet ())) {
1622- InitError (strprintf (_ (" Error: Disk space is low for %s" ), fs::quoted (fs::PathToString (gArgs .GetDataDirNet ()))));
1621+ if (!CheckDiskSpace (args .GetDataDirNet ())) {
1622+ InitError (strprintf (_ (" Error: Disk space is low for %s" ), fs::quoted (fs::PathToString (args .GetDataDirNet ()))));
16231623 return false ;
16241624 }
1625- if (!CheckDiskSpace (gArgs .GetBlocksDirPath ())) {
1626- InitError (strprintf (_ (" Error: Disk space is low for %s" ), fs::quoted (fs::PathToString (gArgs .GetBlocksDirPath ()))));
1625+ if (!CheckDiskSpace (args .GetBlocksDirPath ())) {
1626+ InitError (strprintf (_ (" Error: Disk space is low for %s" ), fs::quoted (fs::PathToString (args .GetBlocksDirPath ()))));
16271627 return false ;
16281628 }
16291629
@@ -1715,7 +1715,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
17151715 if (node.peerman ) node.peerman ->SetBestHeight (chain_active_height);
17161716
17171717 // Map ports with UPnP or NAT-PMP.
1718- StartMapPort (args.GetBoolArg (" -upnp" , DEFAULT_UPNP), gArgs .GetBoolArg (" -natpmp" , DEFAULT_NATPMP));
1718+ StartMapPort (args.GetBoolArg (" -upnp" , DEFAULT_UPNP), args .GetBoolArg (" -natpmp" , DEFAULT_NATPMP));
17191719
17201720 CConnman::Options connOptions;
17211721 connOptions.nLocalServices = nLocalServices;
0 commit comments