aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-09-26 17:36:23 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-09-26 17:36:28 -0400
commitae1cc010b88dd594d2a27b2717cfe14ef04ec852 (patch)
treee4cc9a825514f3911bfad651349a2e1e5dfba2eb
parentd799efe21432ad55c41d5315f24c002bc8b3d119 (diff)
parent7ac911afe7aee0d3ac742a20d0091c0b75e4535e (diff)
Merge #14282: [wallet] Remove -usehd
7ac911afe7 [docs] Add release notes for removing `-usehd` (John Newbery) 25548b2958 [wallet] Remove -usehd (John Newbery) Pull request description: `-usehd` is no longer used (except to tell the user that they've set it incorrectly for the wallet that they're loading). Remove it (in the same spirit as #14272) Tree-SHA512: 5bdcd2bb9bb8504a01343595bcd1bd433d97b730255152c725103c1ac3fa3a9d9e5220a4c29d4c72307cf803e1c09d31080f83603c23dc77263846e17b1826f0
-rw-r--r--doc/release-notes-14282.md6
-rw-r--r--src/init.cpp2
-rw-r--r--src/wallet/wallet.cpp14
-rwxr-xr-xtest/functional/wallet_hd.py6
-rwxr-xr-xtest/lint/check-doc.py2
5 files changed, 8 insertions, 22 deletions
diff --git a/doc/release-notes-14282.md b/doc/release-notes-14282.md
new file mode 100644
index 0000000000..e6d8e0b70c
--- /dev/null
+++ b/doc/release-notes-14282.md
@@ -0,0 +1,6 @@
+Low-level RPC changes
+----------------------
+
+`-usehd` was removed in version 0.16. From that version onwards, all new
+wallets created are hierarchical deterministic wallets. Version 0.18 makes
+specifying `-usehd` invalid config.
diff --git a/src/init.cpp b/src/init.cpp
index 00d97629f7..f9efaf7dc1 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -323,7 +323,7 @@ void SetupServerArgs()
// Hidden Options
std::vector<std::string> hidden_args = {"-h", "-help",
- "-dbcrashratio", "-forcecompactdb", "-usehd",
+ "-dbcrashratio", "-forcecompactdb",
// GUI args. These will be overwritten by SetupUIArgs for the GUI
"-allowselfsignedrootcertificates", "-choosedatadir", "-lang=<lang>", "-min", "-resetguisettings", "-rootcertificates=<file>", "-splash", "-uiplatform"};
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 678d8ddd4d..afe47d986e 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3989,10 +3989,6 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
if (fFirstRun)
{
// ensure this wallet.dat can only be opened by clients supporting HD with chain split and expects no default key
- if (!gArgs.GetBoolArg("-usehd", true)) {
- InitError(strprintf(_("Error creating %s: You can't create non-HD wallets with this version."), walletFile));
- return nullptr;
- }
walletInstance->SetMinVersion(FEATURE_LATEST);
if ((wallet_creation_flags & WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
@@ -4020,16 +4016,6 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
if (!walletInstance->mapKeys.empty() || !walletInstance->mapCryptedKeys.empty()) {
InitWarning(strprintf(_("Warning: Private keys detected in wallet {%s} with disabled private keys"), walletFile));
}
- } else if (gArgs.IsArgSet("-usehd")) {
- bool useHD = gArgs.GetBoolArg("-usehd", true);
- if (walletInstance->IsHDEnabled() && !useHD) {
- InitError(strprintf(_("Error loading %s: You can't disable HD on an already existing HD wallet"), walletFile));
- return nullptr;
- }
- if (!walletInstance->IsHDEnabled() && useHD) {
- InitError(strprintf(_("Error loading %s: You can't enable HD on an already existing non-HD wallet"), walletFile));
- return nullptr;
- }
}
if (!gArgs.GetArg("-addresstype", "").empty() && !ParseOutputType(gArgs.GetArg("-addresstype", ""), walletInstance->m_default_address_type)) {
diff --git a/test/functional/wallet_hd.py b/test/functional/wallet_hd.py
index 48e71f6c40..eb42531693 100755
--- a/test/functional/wallet_hd.py
+++ b/test/functional/wallet_hd.py
@@ -25,12 +25,6 @@ class WalletHDTest(BitcoinTestFramework):
self.skip_if_no_wallet()
def run_test(self):
- # Make sure can't switch off usehd after wallet creation
- self.stop_node(1)
- self.nodes[1].assert_start_raises_init_error(['-usehd=0'], "Error: Error loading : You can't disable HD on an already existing HD wallet")
- self.start_node(1)
- connect_nodes_bi(self.nodes, 0, 1)
-
# Make sure we use hd, keep masterkeyid
masterkeyid = self.nodes[1].getwalletinfo()['hdseedid']
assert_equal(masterkeyid, self.nodes[1].getwalletinfo()['hdmasterkeyid'])
diff --git a/test/lint/check-doc.py b/test/lint/check-doc.py
index 7b056dab32..b0d9f87958 100755
--- a/test/lint/check-doc.py
+++ b/test/lint/check-doc.py
@@ -22,7 +22,7 @@ CMD_ROOT_DIR = '`git rev-parse --show-toplevel`/{}'.format(FOLDER_GREP)
CMD_GREP_ARGS = r"git grep --perl-regexp '{}' -- {} ':(exclude){}'".format(REGEX_ARG, CMD_ROOT_DIR, FOLDER_TEST)
CMD_GREP_DOCS = r"git grep --perl-regexp '{}' {}".format(REGEX_DOC, CMD_ROOT_DIR)
# list unsupported, deprecated and duplicate args as they need no documentation
-SET_DOC_OPTIONAL = set(['-h', '-help', '-dbcrashratio', '-forcecompactdb', '-usehd'])
+SET_DOC_OPTIONAL = set(['-h', '-help', '-dbcrashratio', '-forcecompactdb'])
def main():