@@ -867,7 +867,7 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb
867
867
InitWarning (warnings);
868
868
}
869
869
870
- if (!fs::is_directory (gArgs .GetBlocksDirPath ())) {
870
+ if (!fs::is_directory (args .GetBlocksDirPath ())) {
871
871
return InitError (strprintf (_ (" Specified blocks directory \" %s\" does not exist." ), args.GetArg (" -blocksdir" , " " )));
872
872
}
873
873
@@ -1224,7 +1224,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1224
1224
if (args.IsArgSet (" -asmap" )) {
1225
1225
fs::path asmap_path = args.GetPathArg (" -asmap" , DEFAULT_ASMAP_FILENAME);
1226
1226
if (!asmap_path.is_absolute ()) {
1227
- asmap_path = gArgs .GetDataDirNet () / asmap_path;
1227
+ asmap_path = args .GetDataDirNet () / asmap_path;
1228
1228
}
1229
1229
if (!fs::exists (asmap_path)) {
1230
1230
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)
1254
1254
}
1255
1255
1256
1256
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));
1258
1258
assert (!node.connman );
1259
1259
node.connman = std::make_unique<CConnman>(GetRand<uint64_t >(),
1260
1260
GetRand<uint64_t >(),
@@ -1618,12 +1618,12 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1618
1618
1619
1619
// ********************************************************* Step 11: import blocks
1620
1620
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 ()))));
1623
1623
return false ;
1624
1624
}
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 ()))));
1627
1627
return false ;
1628
1628
}
1629
1629
@@ -1715,7 +1715,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1715
1715
if (node.peerman ) node.peerman ->SetBestHeight (chain_active_height);
1716
1716
1717
1717
// 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));
1719
1719
1720
1720
CConnman::Options connOptions;
1721
1721
connOptions.nLocalServices = nLocalServices;
0 commit comments