diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -22,6 +22,8 @@ - The `importmulti` RPC will now contain a new per-request `warnings` field with strings that explain when fields are being ignored or inconsistent, if any. +- The `hdmasterkeyid` return field has been removed from `getaddressinfo` and + `getwalletinfo`. Use `hdseedid` instead. RPC importprivkey: new label behavior ------------------------------------- diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2971,9 +2971,6 @@ "/kB\n" " \"hdseedid\": \"\" (string, optional) the " "Hash160 of the HD seed (only present when HD is enabled)\n" - " \"hdmasterkeyid\": \"\" (string, optional) " - "alias for hdseedid retained for backwards-compatibility. Will " - "be removed in V0.21.\n" " \"private_keys_enabled\": true|false (boolean) false if " "privatekeys are disabled for this wallet (enforced watch-only " "wallet)\n" @@ -3015,7 +3012,6 @@ obj.pushKV("paytxfee", ValueFromAmount(pwallet->m_pay_tx_fee.GetFeePerK())); if (!seed_id.IsNull()) { obj.pushKV("hdseedid", seed_id.GetHex()); - obj.pushKV("hdmasterkeyid", seed_id.GetHex()); } obj.pushKV("private_keys_enabled", !pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)); @@ -4231,9 +4227,6 @@ "keypath if the key is HD and available\n" " \"hdseedid\" : \"\" (string, optional) The " "Hash160 of the HD seed\n" - " \"hdmasterkeyid\" : \"\" (string, optional) alias " - "for hdseedid maintained for backwards compatibility. Will be " - "removed in V0.21.\n" " \"labels\" (object) Array of labels " "associated with the address.\n" " [\n" @@ -4305,7 +4298,6 @@ if (!meta->hdKeypath.empty()) { ret.pushKV("hdkeypath", meta->hdKeypath); ret.pushKV("hdseedid", meta->hd_seed_id.GetHex()); - ret.pushKV("hdmasterkeyid", meta->hd_seed_id.GetHex()); } } 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 @@ -27,8 +27,6 @@ def run_test(self): # Make sure we use hd, keep masterkeyid masterkeyid = self.nodes[1].getwalletinfo()['hdseedid'] - assert_equal(masterkeyid, self.nodes[1].getwalletinfo()[ - 'hdmasterkeyid']) assert_equal(len(masterkeyid), 40) # create an internal key @@ -56,7 +54,6 @@ hd_info = self.nodes[1].getaddressinfo(hd_add) assert_equal(hd_info["hdkeypath"], "m/0'/0'/" + str(i) + "'") assert_equal(hd_info["hdseedid"], masterkeyid) - assert_equal(hd_info["hdmasterkeyid"], masterkeyid) self.nodes[0].sendtoaddress(hd_add, 1) self.nodes[0].generate(1) self.nodes[0].sendtoaddress(non_hd_add, 1) @@ -90,7 +87,6 @@ hd_info_2 = self.nodes[1].getaddressinfo(hd_add_2) assert_equal(hd_info_2["hdkeypath"], "m/0'/0'/" + str(i) + "'") assert_equal(hd_info_2["hdseedid"], masterkeyid) - assert_equal(hd_info_2["hdmasterkeyid"], masterkeyid) assert_equal(hd_add, hd_add_2) connect_nodes_bi(self.nodes[0], self.nodes[1]) self.sync_all() diff --git a/test/functional/wallet_keypool.py b/test/functional/wallet_keypool.py --- a/test/functional/wallet_keypool.py +++ b/test/functional/wallet_keypool.py @@ -22,8 +22,6 @@ addr_before_encrypting_data = nodes[ 0].getaddressinfo(addr_before_encrypting) wallet_info_old = nodes[0].getwalletinfo() - assert_equal(wallet_info_old['hdseedid'], - wallet_info_old['hdmasterkeyid']) assert addr_before_encrypting_data[ 'hdseedid'] == wallet_info_old['hdseedid'] @@ -33,7 +31,6 @@ addr = nodes[0].getnewaddress() addr_data = nodes[0].getaddressinfo(addr) wallet_info = nodes[0].getwalletinfo() - assert_equal(wallet_info['hdseedid'], wallet_info['hdmasterkeyid']) assert addr_before_encrypting_data[ 'hdseedid'] != wallet_info['hdseedid'] assert addr_data['hdseedid'] == wallet_info['hdseedid']