This commit is contained in:
blackjok3r
2018-10-24 13:06:51 +08:00
parent 9920c80bde
commit 07bc62d2c3

View File

@@ -4959,26 +4959,25 @@ UniValue setpubkey(const UniValue& params, bool fHelp)
if ( fHelp || params.size() != 1 ) if ( fHelp || params.size() != 1 )
throw runtime_error( throw runtime_error(
"setpubkey\n" "setpubkey\n"
"\Sets the -pubkey if the daemon was not started with it, if it was started, it returns the pubkey.\n" "\nSets the -pubkey if the daemon was not started with it, if it was started, it returns the pubkey.\n"
"\nArguments:\n"
"1. \"pubkey\" (string) pubkey to set.\n"
"\nResult:\n" "\nResult:\n"
"[\n"
" {\n" " {\n"
" \"pubkey\" : \"pubkey\", (string) The pubkey\n" " \"pubkey\" : \"pubkey\", (string) The pubkey\n"
" }\n" " }\n"
"]\n"
"\nExamples:\n" "\nExamples:\n"
"\nList pubkey.\n"
+ HelpExampleCli("setpubkey", "02f7597468703c1c5c8465dd6d43acaae697df9df30bed21494d193412a1ea193e") + HelpExampleCli("setpubkey", "02f7597468703c1c5c8465dd6d43acaae697df9df30bed21494d193412a1ea193e")
+ HelpExampleRpc("setpubkey", "02f7597468703c1c5c8465dd6d43acaae697df9df30bed21494d193412a1ea193e") + HelpExampleRpc("setpubkey", "02f7597468703c1c5c8465dd6d43acaae697df9df30bed21494d193412a1ea193e")
); );
extern uint8_t NOTARY_PUBKEY33[]; extern uint8_t NOTARY_PUBKEY33[];
extern std::string NOTARY_PUBKEY; extern std::string NOTARY_PUBKEY;
if ( NOTARY_PUBKEY33[0] == 0 && strlen(params[0].get_str().c_str()) == 66 )) { if ( NOTARY_PUBKEY33[0] == 0 && strlen(params[0].get_str().c_str()) == 66 ) {
NOTARY_PUBKEY = params[0].get_str(); NOTARY_PUBKEY = params[0].get_str();
decode_hex(NOTARY_PUBKEY33,33,(char *)NOTARY_PUBKEY.c_str()); decode_hex(NOTARY_PUBKEY33,33,(char *)NOTARY_PUBKEY.c_str());
} }
result.push_back(Pair("pubkey", NOTARY_PUBKEY); result.push_back(Pair("pubkey", NOTARY_PUBKEY));
return result; return result;
} }