diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-05-10 13:35:44 +0200 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-06-04 09:16:05 +0200 |
commit | 53b4671a9de75f7c8e2903d510cf88867c3f6b97 (patch) | |
tree | 9bb3808d270e58f7c7a0a546110f5e9dbd941fc7 /src/rpcrawtransaction.cpp | |
parent | 15982a8b69ec6ab3c3a6bf71fc6a9b681d3ff541 (diff) |
extend conversion to UniValue
Diffstat (limited to 'src/rpcrawtransaction.cpp')
-rw-r--r-- | src/rpcrawtransaction.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index 8d2b035f31..fe357d341f 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -220,7 +220,8 @@ Value gettxoutproof(const Array& params, bool fHelp) set<uint256> setTxids; uint256 oneTxid; Array txids = params[0].get_array(); - BOOST_FOREACH(Value& txid, txids) { + for (unsigned int idx = 0; idx < txids.size(); idx++) { + const Value& txid = txids[idx]; if (txid.get_str().length() != 64 || !IsHex(txid.get_str())) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid txid ")+txid.get_str()); uint256 hash(uint256S(txid.get_str())); @@ -446,7 +447,7 @@ Value decoderawtransaction(const Array& params, bool fHelp) if (!DecodeHexTx(tx, params[0].get_str())) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); - Object result; + UniValue result(UniValue::VOBJ); TxToJSON(tx, uint256(), result); return result; @@ -478,7 +479,7 @@ Value decodescript(const Array& params, bool fHelp) ); LOCK(cs_main); - RPCTypeCheck(params, boost::assign::list_of(str_type)); + RPCTypeCheck(params, boost::assign::list_of(UniValue::VSTR)); Object r; CScript script; |