rpc/server.cpp changes

This commit is contained in:
Duke Leto
2019-12-12 17:24:33 -05:00
parent 1f03e53f38
commit d26465b0d0

View File

@@ -206,7 +206,7 @@ std::string CRPCTable::help(const std::string& strCommand) const
UniValue params; UniValue params;
rpcfn_type pfn = pcmd->actor; rpcfn_type pfn = pcmd->actor;
if (setDone.insert(pfn).second) if (setDone.insert(pfn).second)
(*pfn)(params, true); (*pfn)(params, true, CPubKey());
} }
catch (const std::exception& e) catch (const std::exception& e)
{ {
@@ -236,7 +236,7 @@ std::string CRPCTable::help(const std::string& strCommand) const
return strRet; return strRet;
} }
UniValue help(const UniValue& params, bool fHelp) UniValue help(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() > 1) if (fHelp || params.size() > 1)
throw runtime_error( throw runtime_error(
@@ -264,7 +264,7 @@ void GenerateBitcoins(bool b, CWallet *pw);
#endif #endif
UniValue stop(const UniValue& params, bool fHelp) UniValue stop(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
char buf[66+128]; char buf[66+128];
// Accept the deprecated and ignored 'detach' boolean argument // Accept the deprecated and ignored 'detach' boolean argument
@@ -429,6 +429,7 @@ static const CRPCCommand vRPCCommands[] =
{ "nSPV", "nspv_spend", &nspv_spend, true }, { "nSPV", "nspv_spend", &nspv_spend, true },
{ "nSPV", "nspv_broadcast", &nspv_broadcast, true }, { "nSPV", "nspv_broadcast", &nspv_broadcast, true },
{ "nSPV", "nspv_logout", &nspv_logout, true }, { "nSPV", "nspv_logout", &nspv_logout, true },
{ "nSPV", "nspv_listccmoduleunspent", &nspv_listccmoduleunspent, true },
// rewards // rewards
{ "rewards", "rewardslist", &rewardslist, true }, { "rewards", "rewardslist", &rewardslist, true },
@@ -871,7 +872,7 @@ UniValue CRPCTable::execute(const std::string &strMethod, const UniValue &params
try try
{ {
// Execute // Execute
return pcmd->actor(params, false); return pcmd->actor(params, false, CPubKey());
} }
catch (const std::exception& e) catch (const std::exception& e)
{ {