mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
[Wallet] print hd masterkeyid in getwalletinfo
This commit is contained in:
parent
b1c7b244e2
commit
986c223214
@ -2269,6 +2269,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
|
|||||||
" \"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"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("getwalletinfo", "")
|
+ HelpExampleCli("getwalletinfo", "")
|
||||||
@ -2288,6 +2289,9 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
|
|||||||
if (pwalletMain->IsCrypted())
|
if (pwalletMain->IsCrypted())
|
||||||
obj.push_back(Pair("unlocked_until", nWalletUnlockTime));
|
obj.push_back(Pair("unlocked_until", nWalletUnlockTime));
|
||||||
obj.push_back(Pair("paytxfee", ValueFromAmount(payTxFee.GetFeePerK())));
|
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;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -901,6 +901,7 @@ public:
|
|||||||
|
|
||||||
/* Set the current hd master key (will reset the chain child index counters) */
|
/* Set the current hd master key (will reset the chain child index counters) */
|
||||||
bool SetHDMasterKey(const CKey& key);
|
bool SetHDMasterKey(const CKey& key);
|
||||||
|
const CHDChain& GetHDChain() { return hdChain; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/** A key allocated from the key pool. */
|
/** A key allocated from the key pool. */
|
||||||
|
Loading…
Reference in New Issue
Block a user