aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-11-11 16:30:38 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-12-02 18:28:22 -0800
commita1883536b455b889f1ebfca9e50d1e0ef28a7731 (patch)
tree8ff0fd54bcca03345bda6860fe170759516be508 /src/rpc/rawtransaction.cpp
parent2efcfa5acfacb958973d9e8125e1d81f102e2dfd (diff)
Switch GetTransaction to returning a CTransactionRef
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r--src/rpc/rawtransaction.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index ce16870d3c..673979886a 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -218,19 +218,19 @@ UniValue getrawtransaction(const JSONRPCRequest& request)
}
}
- CTransaction tx;
+ CTransactionRef tx;
uint256 hashBlock;
if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true))
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction");
- string strHex = EncodeHexTx(tx);
+ string strHex = EncodeHexTx(*tx);
if (!fVerbose)
return strHex;
UniValue result(UniValue::VOBJ);
result.push_back(Pair("hex", strHex));
- TxToJSON(tx, hashBlock, result);
+ TxToJSON(*tx, hashBlock, result);
return result;
}
@@ -289,7 +289,7 @@ UniValue gettxoutproof(const JSONRPCRequest& request)
if (pblockindex == NULL)
{
- CTransaction tx;
+ CTransactionRef tx;
if (!GetTransaction(oneTxid, tx, Params().GetConsensus(), hashBlock, false) || hashBlock.IsNull())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Transaction not yet in block");
if (!mapBlockIndex.count(hashBlock))