aboutsummaryrefslogtreecommitdiff
path: root/src/rest.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2015-11-10 15:23:41 +0100
committerWladimir J. van der Laan <[email protected]>2015-11-10 15:32:03 +0100
commit77beab70deae8ad821cc069c1ce80fc809c89c33 (patch)
treed2d9aa3be7959400c2176d0d6c2e75a4f3925d6f /src/rest.cpp
parentMerge pull request #6967 (diff)
parentGlobals: Explicit Consensus::Params arg for main: (diff)
downloaddiscoin-77beab70deae8ad821cc069c1ce80fc809c89c33.tar.xz
discoin-77beab70deae8ad821cc069c1ce80fc809c89c33.zip
Merge pull request #6163
87cbdb8 Globals: Explicit Consensus::Params arg for main: (Jorge Timón)
Diffstat (limited to 'src/rest.cpp')
-rw-r--r--src/rest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rest.cpp b/src/rest.cpp
index c46d7a8bd..5d69542a9 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -4,6 +4,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chain.h"
+#include "chainparams.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "main.h"
@@ -223,7 +224,7 @@ static bool rest_block(HTTPRequest* req,
if (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0)
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not available (pruned data)");
- if (!ReadBlockFromDisk(block, pblockindex))
+ if (!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus()))
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
}
@@ -360,7 +361,7 @@ static bool rest_tx(HTTPRequest* req, const std::string& strURIPart)
CTransaction tx;
uint256 hashBlock = uint256();
- if (!GetTransaction(hash, tx, hashBlock, true))
+ if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true))
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);