diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-11-11 16:30:38 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-12-02 18:28:22 -0800 |
commit | a1883536b455b889f1ebfca9e50d1e0ef28a7731 (patch) | |
tree | 8ff0fd54bcca03345bda6860fe170759516be508 /src/rest.cpp | |
parent | 2efcfa5acfacb958973d9e8125e1d81f102e2dfd (diff) |
Switch GetTransaction to returning a CTransactionRef
Diffstat (limited to 'src/rest.cpp')
-rw-r--r-- | src/rest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rest.cpp b/src/rest.cpp index 7d7a7d3225..6379061f8f 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -363,7 +363,7 @@ static bool rest_tx(HTTPRequest* req, const std::string& strURIPart) if (!ParseHashStr(hashStr, hash)) return RESTERR(req, HTTP_BAD_REQUEST, "Invalid hash: " + hashStr); - CTransaction tx; + CTransactionRef tx; uint256 hashBlock = uint256(); if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true)) return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found"); @@ -388,7 +388,7 @@ static bool rest_tx(HTTPRequest* req, const std::string& strURIPart) case RF_JSON: { UniValue objTx(UniValue::VOBJ); - TxToJSON(tx, hashBlock, objTx); + TxToJSON(*tx, hashBlock, objTx); string strJSON = objTx.write() + "\n"; req->WriteHeader("Content-Type", "application/json"); req->WriteReply(HTTP_OK, strJSON); |