aboutsummaryrefslogtreecommitdiff
path: root/src/test/rpc_wallet_tests.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/test/rpc_wallet_tests.cpp
parent3df0411ad9fd75fb27af53e44835d41f5480fe3f (diff)
downloadbitcoin-9a8897f4ac992741e153d88b54bd2cde877c713d.tar.xz
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/test/rpc_wallet_tests.cpp')
-rw-r--r--src/test/rpc_wallet_tests.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp
index 1a897fcd54..a72b656100 100644
--- a/src/test/rpc_wallet_tests.cpp
+++ b/src/test/rpc_wallet_tests.cpp
@@ -14,11 +14,12 @@
#include <boost/algorithm/string.hpp>
#include <boost/test/unit_test.hpp>
+#include "univalue/univalue.h"
+
using namespace std;
-using namespace json_spirit;
extern UniValue createArgs(int nRequired, const char* address1 = NULL, const char* address2 = NULL);
-extern Value CallRPC(string args);
+extern UniValue CallRPC(string args);
extern CWallet* pwalletMain;
@@ -35,7 +36,7 @@ BOOST_AUTO_TEST_CASE(rpc_addmultisig)
// new, compressed:
const char address2Hex[] = "0388c2037017c62240b6b72ac1a2a5f94da790596ebd06177c8572752922165cb4";
- Value v;
+ UniValue v;
CBitcoinAddress address;
BOOST_CHECK_NO_THROW(v = addmultisig(createArgs(1, address1Hex), false));
address.SetString(v.get_str());
@@ -66,13 +67,13 @@ BOOST_AUTO_TEST_CASE(rpc_addmultisig)
BOOST_AUTO_TEST_CASE(rpc_wallet)
{
// Test RPC calls for various wallet statistics
- Value r;
+ UniValue r;
LOCK2(cs_main, pwalletMain->cs_wallet);
CPubKey demoPubkey = pwalletMain->GenerateNewKey();
CBitcoinAddress demoAddress = CBitcoinAddress(CTxDestination(demoPubkey.GetID()));
- Value retValue;
+ UniValue retValue;
string strAccount = "walletDemoAccount";
string strPurpose = "receive";
BOOST_CHECK_NO_THROW({ /*Initialize Wallet with an account */