diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-07-09 11:25:02 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-07-09 12:12:36 +0200 |
commit | 986c2232143e5c2f909f5b27bf74470654faf49c (patch) | |
tree | 9def9b4fdda7892f497717a814413c5ca8879a21 /src/wallet/rpcwallet.cpp | |
parent | b1c7b244e21ba67c38fe3d1a4d1638ca52835ac5 (diff) |
[Wallet] print hd masterkeyid in getwalletinfo
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 8538f880ff..f4625743b3 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2269,6 +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" "}\n" "\nExamples:\n" + HelpExampleCli("getwalletinfo", "") @@ -2288,6 +2289,9 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp) if (pwalletMain->IsCrypted()) obj.push_back(Pair("unlocked_until", nWalletUnlockTime)); obj.push_back(Pair("paytxfee", ValueFromAmount(payTxFee.GetFeePerK()))); + CKeyID masterKeyID = pwalletMain->GetHDChain().masterKeyID; + if (!masterKeyID.IsNull()) + obj.push_back(Pair("masterkeyid",masterKeyID.GetHex())); return obj; } |