From 9a8897f4ac992741e153d88b54bd2cde877c713d Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Mon, 18 May 2015 14:02:18 +0200 Subject: 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 --- src/rpcnet.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/rpcnet.cpp') 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 -#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& 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( -- cgit v1.2.3