Skip to content

Commit

Permalink
[Wallet] Correct hdmasterkeyid/masterkeyid name confusion
Browse files Browse the repository at this point in the history
Github-Pull: #8390
Rebased-From: b50e1ac
  • Loading branch information
jonasschnelli authored and laanwj committed Jul 25, 2016
1 parent 76bc30b commit 73adfe3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion qa/rpc-tests/wallet-hd.py
Expand Up @@ -31,7 +31,7 @@ def run_test (self):
tmpdir = self.options.tmpdir tmpdir = self.options.tmpdir


# Make sure we use hd, keep masterkeyid # Make sure we use hd, keep masterkeyid
masterkeyid = self.nodes[1].getwalletinfo()['masterkeyid'] masterkeyid = self.nodes[1].getwalletinfo()['hdmasterkeyid']
assert_equal(len(masterkeyid), 40) assert_equal(len(masterkeyid), 40)


# Import a non-HD private key in the HD wallet # Import a non-HD private key in the HD wallet
Expand Down
22 changes: 11 additions & 11 deletions src/wallet/rpcwallet.cpp
Expand Up @@ -2260,16 +2260,16 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
"Returns an object containing various wallet state info.\n" "Returns an object containing various wallet state info.\n"
"\nResult:\n" "\nResult:\n"
"{\n" "{\n"
" \"walletversion\": xxxxx, (numeric) the wallet version\n" " \"walletversion\": xxxxx, (numeric) the wallet version\n"
" \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + CURRENCY_UNIT + "\n" " \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n" " \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + CURRENCY_UNIT + "\n" " \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + CURRENCY_UNIT + "\n"
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n" " \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n" " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n" " \"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" " \"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" " \"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" "}\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("getwalletinfo", "") + HelpExampleCli("getwalletinfo", "")
Expand All @@ -2291,7 +2291,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
obj.push_back(Pair("paytxfee", ValueFromAmount(payTxFee.GetFeePerK()))); obj.push_back(Pair("paytxfee", ValueFromAmount(payTxFee.GetFeePerK())));
CKeyID masterKeyID = pwalletMain->GetHDChain().masterKeyID; CKeyID masterKeyID = pwalletMain->GetHDChain().masterKeyID;
if (!masterKeyID.IsNull()) if (!masterKeyID.IsNull())
obj.push_back(Pair("masterkeyid", masterKeyID.GetHex())); obj.push_back(Pair("hdmasterkeyid", masterKeyID.GetHex()));
return obj; return obj;
} }


Expand Down

0 comments on commit 73adfe3

Please sign in to comment.