aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmisc.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-05-10 14:48:35 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-06-04 09:16:05 +0200
commit6c7bee062437acbc078533fdcf8e53794031bf99 (patch)
tree9af2921524e39c6c25df31fba9d1dd55e03ba04b /src/rpcmisc.cpp
parent53b4671a9de75f7c8e2903d510cf88867c3f6b97 (diff)
expicit set UniValue type to avoid empty values
Diffstat (limited to 'src/rpcmisc.cpp')
-rw-r--r--src/rpcmisc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index b06408f21e..2d54b555b9 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -77,7 +77,7 @@ Value getinfo(const Array& params, bool fHelp)
proxyType proxy;
GetProxy(NET_IPV4, proxy);
- Object obj;
+ UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("version", CLIENT_VERSION));
obj.push_back(Pair("protocolversion", PROTOCOL_VERSION));
#ifdef ENABLE_WALLET
@@ -118,7 +118,7 @@ public:
Object operator()(const CNoDestination &dest) const { return Object(); }
Object operator()(const CKeyID &keyID) const {
- Object obj;
+ UniValue obj(UniValue::VOBJ);
CPubKey vchPubKey;
obj.push_back(Pair("isscript", false));
if (mine == ISMINE_SPENDABLE) {
@@ -130,7 +130,7 @@ public:
}
Object operator()(const CScriptID &scriptID) const {
- Object obj;
+ UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("isscript", true));
if (mine != ISMINE_NO) {
CScript subscript;
@@ -141,7 +141,7 @@ public:
ExtractDestinations(subscript, whichType, addresses, nRequired);
obj.push_back(Pair("script", GetTxnOutputType(whichType)));
obj.push_back(Pair("hex", HexStr(subscript.begin(), subscript.end())));
- Array a;
+ UniValue a(UniValue::VARR);
BOOST_FOREACH(const CTxDestination& addr, addresses)
a.push_back(CBitcoinAddress(addr).ToString());
obj.push_back(Pair("addresses", a));
@@ -186,7 +186,7 @@ Value validateaddress(const Array& params, bool fHelp)
CBitcoinAddress address(params[0].get_str());
bool isValid = address.IsValid();
- Object ret;
+ UniValue ret(UniValue::VOBJ);
ret.push_back(Pair("isvalid", isValid));
if (isValid)
{
@@ -312,7 +312,7 @@ Value createmultisig(const Array& params, bool fHelp)
CScriptID innerID(inner);
CBitcoinAddress address(innerID);
- Object result;
+ UniValue result;
result.push_back(Pair("address", address.ToString()));
result.push_back(Pair("redeemScript", HexStr(inner.begin(), inner.end())));