rpc/net.cpp changes

This commit is contained in:
Duke Leto
2019-12-12 17:21:54 -05:00
parent 8f46f4cc68
commit 1f03e53f38

View File

@@ -36,7 +36,7 @@
using namespace std; using namespace std;
UniValue getconnectioncount(const UniValue& params, bool fHelp) UniValue getconnectioncount(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() != 0) if (fHelp || params.size() != 0)
throw runtime_error( throw runtime_error(
@@ -54,7 +54,7 @@ UniValue getconnectioncount(const UniValue& params, bool fHelp)
return (int)vNodes.size(); return (int)vNodes.size();
} }
UniValue ping(const UniValue& params, bool fHelp) UniValue ping(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() != 0) if (fHelp || params.size() != 0)
throw runtime_error( throw runtime_error(
@@ -90,7 +90,7 @@ static void CopyNodeStats(std::vector<CNodeStats>& vstats)
} }
} }
UniValue getpeerinfo(const UniValue& params, bool fHelp) UniValue getpeerinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() != 0) if (fHelp || params.size() != 0)
throw runtime_error( throw runtime_error(
@@ -229,7 +229,7 @@ int32_t komodo_longestchain()
return(KOMODO_LONGESTCHAIN); return(KOMODO_LONGESTCHAIN);
} }
UniValue addnode(const UniValue& params, bool fHelp) UniValue addnode(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
string strCommand; string strCommand;
if (params.size() == 2) if (params.size() == 2)
@@ -279,7 +279,7 @@ UniValue addnode(const UniValue& params, bool fHelp)
return NullUniValue; return NullUniValue;
} }
UniValue disconnectnode(const UniValue& params, bool fHelp) UniValue disconnectnode(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() != 1) if (fHelp || params.size() != 1)
throw runtime_error( throw runtime_error(
@@ -301,7 +301,7 @@ UniValue disconnectnode(const UniValue& params, bool fHelp)
return NullUniValue; return NullUniValue;
} }
UniValue getaddednodeinfo(const UniValue& params, bool fHelp) UniValue getaddednodeinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() < 1 || params.size() > 2) if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error( throw runtime_error(
@@ -417,7 +417,7 @@ UniValue getaddednodeinfo(const UniValue& params, bool fHelp)
return ret; return ret;
} }
UniValue getnettotals(const UniValue& params, bool fHelp) UniValue getnettotals(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() > 0) if (fHelp || params.size() > 0)
throw runtime_error( throw runtime_error(
@@ -463,7 +463,7 @@ static UniValue GetNetworksInfo()
return networks; return networks;
} }
UniValue getdeprecationinfo(const UniValue& params, bool fHelp) UniValue getdeprecationinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
const CChainParams& chainparams = Params(); const CChainParams& chainparams = Params();
if (fHelp || params.size() != 0 || chainparams.NetworkIDString() != "main") if (fHelp || params.size() != 0 || chainparams.NetworkIDString() != "main")
@@ -490,7 +490,7 @@ UniValue getdeprecationinfo(const UniValue& params, bool fHelp)
return obj; return obj;
} }
UniValue getnetworkinfo(const UniValue& params, bool fHelp) UniValue getnetworkinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() != 0) if (fHelp || params.size() != 0)
throw runtime_error( throw runtime_error(
@@ -557,7 +557,7 @@ UniValue getnetworkinfo(const UniValue& params, bool fHelp)
return obj; return obj;
} }
UniValue setban(const UniValue& params, bool fHelp) UniValue setban(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
string strCommand; string strCommand;
if (params.size() >= 2) if (params.size() >= 2)
@@ -621,7 +621,7 @@ UniValue setban(const UniValue& params, bool fHelp)
return NullUniValue; return NullUniValue;
} }
UniValue listbanned(const UniValue& params, bool fHelp) UniValue listbanned(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() != 0) if (fHelp || params.size() != 0)
throw runtime_error( throw runtime_error(
@@ -647,7 +647,7 @@ UniValue listbanned(const UniValue& params, bool fHelp)
return bannedAddresses; return bannedAddresses;
} }
UniValue clearbanned(const UniValue& params, bool fHelp) UniValue clearbanned(const UniValue& params, bool fHelp, const CPubKey& mypk)
{ {
if (fHelp || params.size() != 0) if (fHelp || params.size() != 0)
throw runtime_error( throw runtime_error(