[Wallet] print hd masterkeyid in getwalletinfo

Zcash: modified for zip32
This commit is contained in:
Jonas Schnelli 2016-07-09 11:25:02 +02:00 committed by Eirik Ogilvie-Wigley
parent b6d1af89f2
commit 82e71233b0
1 changed files with 4 additions and 0 deletions

View File

@ -2280,6 +2280,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"
" \"seedfp\": \"uint256\", (string) the BLAKE2b-256 hash of the HD seed\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getwalletinfo", "")
@ -2299,6 +2300,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())));
uint256 seedFp = pwalletMain->GetHDChain().seedFp;
if (!seedFp.IsNull())
obj.push_back(Pair("seedfp", seedFp.GetHex()));
return obj;
}