aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmisc.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/rpcmisc.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/rpcmisc.cpp')
-rw-r--r--src/rpcmisc.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 15bbe90bc7..f5fc22aff1 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -20,9 +20,9 @@
#include <stdint.h>
#include <boost/assign/list_of.hpp>
-#include "json_spirit_wrapper.h"
-using namespace json_spirit;
+#include "univalue/univalue.h"
+
using namespace std;
/**
@@ -38,7 +38,7 @@ using namespace std;
*
* Or alternatively, create a specific query method for the information.
**/
-UniValue getinfo(const Array& params, bool fHelp)
+UniValue getinfo(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
@@ -107,7 +107,7 @@ UniValue getinfo(const Array& params, bool fHelp)
}
#ifdef ENABLE_WALLET
-class DescribeAddressVisitor : public boost::static_visitor<Object>
+class DescribeAddressVisitor : public boost::static_visitor<UniValue>
{
private:
isminetype mine;
@@ -115,7 +115,7 @@ private:
public:
DescribeAddressVisitor(isminetype mineIn) : mine(mineIn) {}
- UniValue operator()(const CNoDestination &dest) const { return Object(); }
+ UniValue operator()(const CNoDestination &dest) const { return UniValue(UniValue::VOBJ); }
UniValue operator()(const CKeyID &keyID) const {
UniValue obj(UniValue::VOBJ);
@@ -153,7 +153,7 @@ public:
};
#endif
-UniValue validateaddress(const Array& params, bool fHelp)
+UniValue validateaddress(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
@@ -215,10 +215,10 @@ UniValue validateaddress(const Array& params, bool fHelp)
/**
* Used by addmultisigaddress / createmultisig:
*/
-CScript _createmultisig_redeemScript(const Array& params)
+CScript _createmultisig_redeemScript(const UniValue& params)
{
int nRequired = params[0].get_int();
- const Array& keys = params[1].get_array();
+ const UniValue& keys = params[1].get_array();
// Gather public keys
if (nRequired < 1)
@@ -276,7 +276,7 @@ CScript _createmultisig_redeemScript(const Array& params)
return result;
}
-UniValue createmultisig(const Array& params, bool fHelp)
+UniValue createmultisig(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() < 2 || params.size() > 2)
{
@@ -319,7 +319,7 @@ UniValue createmultisig(const Array& params, bool fHelp)
return result;
}
-UniValue verifymessage(const Array& params, bool fHelp)
+UniValue verifymessage(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 3)
throw runtime_error(
@@ -373,7 +373,7 @@ UniValue verifymessage(const Array& params, bool fHelp)
return (pubkey.GetID() == keyID);
}
-UniValue setmocktime(const Array& params, bool fHelp)
+UniValue setmocktime(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(