aboutsummaryrefslogtreecommitdiff
path: root/src/rpcnet.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-05-18 14:02:18 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-06-04 09:16:21 +0200
commit9a8897f4ac992741e153d88b54bd2cde877c713d (patch)
treee827981679708bae6bef1516d69efda3524b719f /src/rpcnet.cpp
parent3df0411ad9fd75fb27af53e44835d41f5480fe3f (diff)
Remove JSON Spirit wrapper, remove JSON Spirit leftovers
- implement find_value() function for UniValue - replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper - remove JSON Spirit sources
Diffstat (limited to 'src/rpcnet.cpp')
-rw-r--r--src/rpcnet.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 17eda22451..59253e72af 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -16,12 +16,11 @@
#include <boost/foreach.hpp>
-#include "json_spirit_wrapper.h"
+#include "univalue/univalue.h"
-using namespace json_spirit;
using namespace std;
-UniValue getconnectioncount(const Array& params, bool fHelp)
+UniValue getconnectioncount(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
@@ -39,7 +38,7 @@ UniValue getconnectioncount(const Array& params, bool fHelp)
return (int)vNodes.size();
}
-UniValue ping(const Array& params, bool fHelp)
+UniValue ping(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
@@ -75,7 +74,7 @@ static void CopyNodeStats(std::vector<CNodeStats>& vstats)
}
}
-UniValue getpeerinfo(const Array& params, bool fHelp)
+UniValue getpeerinfo(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
@@ -165,7 +164,7 @@ UniValue getpeerinfo(const Array& params, bool fHelp)
return ret;
}
-UniValue addnode(const Array& params, bool fHelp)
+UniValue addnode(const UniValue& params, bool fHelp)
{
string strCommand;
if (params.size() == 2)
@@ -215,7 +214,7 @@ UniValue addnode(const Array& params, bool fHelp)
return NullUniValue;
}
-UniValue getaddednodeinfo(const Array& params, bool fHelp)
+UniValue getaddednodeinfo(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
@@ -332,7 +331,7 @@ UniValue getaddednodeinfo(const Array& params, bool fHelp)
return ret;
}
-UniValue getnettotals(const Array& params, bool fHelp)
+UniValue getnettotals(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() > 0)
throw runtime_error(
@@ -378,7 +377,7 @@ static UniValue GetNetworksInfo()
return networks;
}
-UniValue getnetworkinfo(const Array& params, bool fHelp)
+UniValue getnetworkinfo(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(