aboutsummaryrefslogtreecommitdiff
path: root/src/rpcblockchain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpcblockchain.cpp')
-rw-r--r--src/rpcblockchain.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 79528db2fe..2f9fd5e045 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -13,7 +13,7 @@
#include <stdint.h>
-#include "json/json_spirit_value.h"
+#include "json_spirit_wrapper.h"
using namespace json_spirit;
using namespace std;
@@ -206,7 +206,13 @@ Value getrawmempool(const Array& params, bool fHelp)
if (mempool.exists(txin.prevout.hash))
setDepends.insert(txin.prevout.hash.ToString());
}
- Array depends(setDepends.begin(), setDepends.end());
+
+ UniValue depends;
+ BOOST_FOREACH(const string& dep, setDepends)
+ {
+ depends.push_back(dep);
+ }
+
info.push_back(Pair("depends", depends));
o.push_back(Pair(hash.ToString(), info));
}
@@ -412,14 +418,14 @@ Value gettxout(const Array& params, bool fHelp)
LOCK(mempool.cs);
CCoinsViewMemPool view(pcoinsTip, mempool);
if (!view.GetCoins(hash, coins))
- return Value::null;
+ return NullUniValue;
mempool.pruneSpent(hash, coins); // TODO: this should be done by the CCoinsViewMemPool
} else {
if (!pcoinsTip->GetCoins(hash, coins))
- return Value::null;
+ return NullUniValue;
}
if (n<0 || (unsigned int)n>=coins.vout.size() || coins.vout[n].IsNull())
- return Value::null;
+ return NullUniValue;
BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
CBlockIndex *pindex = it->second;