Page MenuHomePhabricator

D5933.diff
No OneTemporary

D5933.diff

diff --git a/doc/release-notes.md b/doc/release-notes.md
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -34,6 +34,8 @@
that coin selection is influenced by the `-spendzeroconfchange`,
`-limitancestorcount`, `-limitdescendantcount` and `-walletrejectlongchains`
command line arguments.
+- 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
@@ -2923,9 +2923,6 @@
"/kB\n"
" \"hdseedid\": \"<hash160>\" (string, optional) the "
"Hash160 of the HD seed (only present when HD is enabled)\n"
- " \"hdmasterkeyid\": \"<hash160>\" (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"
@@ -2967,7 +2964,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));
@@ -4157,9 +4153,6 @@
"keypath if the key is HD and available\n"
" \"hdseedid\" : \"<hash160>\" (string, optional) The "
"Hash160 of the HD seed\n"
- " \"hdmasterkeyid\" : \"<hash160>\" (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"
@@ -4231,7 +4224,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']

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 1, 11:28 (6 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187612
Default Alt Text
D5933.diff (4 KB)

Event Timeline