diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-05 08:01:20 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-05 08:05:48 +0100 |
commit | 46904ee5d2ce867b522a582b23e1ac6735179e5c (patch) | |
tree | ac8c79733afef5eb6dff533ec867165d968d2b12 /src/rest.cpp | |
parent | 4d955fc5824b1891ea082f5ebdfa5473e37323ca (diff) | |
parent | 81e3228fcb33e8ed32d8b9fbe917444ba080073a (diff) | |
download | bitcoin-46904ee5d2ce867b522a582b23e1ac6735179e5c.tar.xz |
Merge #8580: Make CTransaction actually immutable
81e3228 Make CTransaction actually immutable (Pieter Wuille)
42fd8de Make DecodeHexTx return a CMutableTransaction (Pieter Wuille)
c3f5673 Make CWalletTx store a CTransactionRef instead of inheriting (Pieter Wuille)
a188353 Switch GetTransaction to returning a CTransactionRef (Pieter Wuille)
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); |