Skip to content

Commit dd99dd0

Browse files
add gArgs for a couple things not caught by scripted diff
Signed-off-by: Pasta <pasta@dashboost.org>
1 parent 5d5171f commit dd99dd0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/init.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -983,8 +983,8 @@ void InitParameterInteraction()
983983
}
984984

985985
if (gArgs.IsArgSet("-hdseed") && IsHex(gArgs.GetArg("-hdseed", "not hex")) && (gArgs.IsArgSet("-mnemonic") || gArgs.IsArgSet("-mnemonicpassphrase"))) {
986-
ForceRemoveArg("-mnemonic");
987-
ForceRemoveArg("-mnemonicpassphrase");
986+
gArgs.ForceRemoveArg("-mnemonic");
987+
gArgs.ForceRemoveArg("-mnemonicpassphrase");
988988
LogPrintf("%s: parameter interaction: can't use -hdseed and -mnemonic/-mnemonicpassphrase together, will prefer -seed\n", __func__);
989989
}
990990
#endif // ENABLE_WALLET

src/util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,10 +673,10 @@ const fs::path &GetDataDir(bool fNetSpecific)
673673

674674
fs::path GetBackupsDir()
675675
{
676-
if (!IsArgSet("-walletbackupsdir"))
676+
if (!gArgs.IsArgSet("-walletbackupsdir"))
677677
return GetDataDir() / "backups";
678678

679-
return fs::absolute(GetArg("-walletbackupsdir", ""));
679+
return fs::absolute(gArgs.GetArg("-walletbackupsdir", ""));
680680
}
681681

682682
void ClearDatadirCache()

src/wallet/wallet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,9 +1583,9 @@ void CWallet::GenerateNewHDChain()
15831583
throw std::runtime_error(std::string(__func__) + ": SetHDChain failed");
15841584

15851585
// clean up
1586-
ForceRemoveArg("-hdseed");
1587-
ForceRemoveArg("-mnemonic");
1588-
ForceRemoveArg("-mnemonicpassphrase");
1586+
gArgs.ForceRemoveArg("-hdseed");
1587+
gArgs.ForceRemoveArg("-mnemonic");
1588+
gArgs.ForceRemoveArg("-mnemonicpassphrase");
15891589
}
15901590

15911591
bool CWallet::SetHDChain(const CHDChain& chain, bool memonly)
@@ -5122,7 +5122,7 @@ bool CWallet::ParameterInteraction()
51225122
LogPrintf("%s: Warning: incorrect parameter -walletbackupsdir, path must exist! Using default path.\n", __func__);
51235123
InitWarning("Warning: incorrect parameter -walletbackupsdir, path must exist! Using default path.\n");
51245124

5125-
ForceRemoveArg("-walletbackupsdir");
5125+
gArgs.ForceRemoveArg("-walletbackupsdir");
51265126
}
51275127
}
51285128

0 commit comments

Comments
 (0)