Browse Source

[Wallet] Correct hdmasterkeyid/masterkeyid name confusion

Github-Pull: #8390
Rebased-From: b50e1ac298
0.13
Jonas Schnelli 8 years ago committed by Wladimir J. van der Laan
parent
commit
73adfe3bb9
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      qa/rpc-tests/wallet-hd.py
  2. 4
      src/wallet/rpcwallet.cpp

2
qa/rpc-tests/wallet-hd.py

@ -31,7 +31,7 @@ class WalletHDTest(BitcoinTestFramework): @@ -31,7 +31,7 @@ class WalletHDTest(BitcoinTestFramework):
tmpdir = self.options.tmpdir
# Make sure we use hd, keep masterkeyid
masterkeyid = self.nodes[1].getwalletinfo()['masterkeyid']
masterkeyid = self.nodes[1].getwalletinfo()['hdmasterkeyid']
assert_equal(len(masterkeyid), 40)
# Import a non-HD private key in the HD wallet

4
src/wallet/rpcwallet.cpp

@ -2269,7 +2269,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp) @@ -2269,7 +2269,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
" \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
" \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + "/kB\n"
" \"masterkeyid\": \"<hash160>\", (string) the Hash160 of the HD master pubkey\n"
" \"hdmasterkeyid\": \"<hash160>\", (string) the Hash160 of the HD master pubkey\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getwalletinfo", "")
@ -2291,7 +2291,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp) @@ -2291,7 +2291,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
obj.push_back(Pair("paytxfee", ValueFromAmount(payTxFee.GetFeePerK())));
CKeyID masterKeyID = pwalletMain->GetHDChain().masterKeyID;
if (!masterKeyID.IsNull())
obj.push_back(Pair("masterkeyid", masterKeyID.GetHex()));
obj.push_back(Pair("hdmasterkeyid", masterKeyID.GetHex()));
return obj;
}

Loading…
Cancel
Save