diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -4,3 +4,9 @@ This release includes the following features and fixes: - + +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 --- a/src/init.cpp +++ b/src/init.cpp @@ -348,7 +348,7 @@ std::vector hidden_args = { "-rpcssl", "-benchmark", "-h", "-help", "-socks", "-tor", "-debugnet", "-whitelistalwaysrelay", "-blockminsize", "-dbcrashratio", - "-forcecompactdb", "-usehd", "-parkdeepreorg", "-automaticunparking", + "-forcecompactdb", "-parkdeepreorg", "-automaticunparking", "-replayprotectionactivationtime", "-enableminerfund", // GUI args. These will be overwritten by SetupUIArgs for the GUI "-allowselfsignedrootcertificates", "-choosedatadir", "-lang=", diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4523,12 +4523,6 @@ 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)) { @@ -4567,22 +4561,6 @@ "{%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.IsArgSet("-mintxfee")) { diff --git a/test/functional/wallet_hd.py b/test/functional/wallet_hd.py --- a/test/functional/wallet_hd.py +++ b/test/functional/wallet_hd.py @@ -25,13 +25,6 @@ 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], self.nodes[1]) - # Make sure we use hd, keep masterkeyid masterkeyid = self.nodes[1].getwalletinfo()['hdseedid'] assert_equal(masterkeyid, self.nodes[1].getwalletinfo()[ diff --git a/test/lint/check-doc.py b/test/lint/check-doc.py --- a/test/lint/check-doc.py +++ b/test/lint/check-doc.py @@ -45,7 +45,6 @@ '-rpcssl', '-socks', '-tor', - '-usehd', '-whitelistalwaysrelay'])