mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
add compressed option to masternode genkey
(#2232)
* add compressed option to `masternode genkey` * use ParseBoolV method * adjust help message for masternode genkey
This commit is contained in:
parent
98ed90cbb4
commit
2997d6d268
@ -145,7 +145,7 @@ UniValue masternode(const JSONRPCRequest& request)
|
||||
" check - Force check all masternodes and remove invalid ones\n"
|
||||
" count - Get information about number of masternodes (DEPRECATED options: 'total', 'ps', 'enabled', 'qualify', 'all')\n"
|
||||
" current - Print info on current masternode winner to be paid the next block (calculated locally)\n"
|
||||
" genkey - Generate new masternodeprivkey\n"
|
||||
" genkey - Generate new masternodeprivkey, optional param: 'compressed' (boolean, optional, default=false) generate compressed privkey\n"
|
||||
#ifdef ENABLE_WALLET
|
||||
" outputs - Print masternode compatible outputs\n"
|
||||
" start-alias - Start single remote masternode by assigned alias configured in masternode.conf\n"
|
||||
@ -375,8 +375,13 @@ UniValue masternode(const JSONRPCRequest& request)
|
||||
|
||||
if (strCommand == "genkey")
|
||||
{
|
||||
bool fCompressed = false;
|
||||
if (request.params.size() > 1) {
|
||||
fCompressed = ParseBoolV(request.params[1], "compressed");
|
||||
}
|
||||
|
||||
CKey secret;
|
||||
secret.MakeNewKey(false);
|
||||
secret.MakeNewKey(fCompressed);
|
||||
|
||||
return CBitcoinSecret(secret).ToString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user