diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2015-04-17 14:19:21 +0200 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2015-10-30 14:07:30 +0100 |
commit | 87cbdb8b41eee4067023cfa0d9d68722da74a5eb (patch) | |
tree | 2da5f329b57e2b9624db73407ec70fca187f0888 /src/rest.cpp | |
parent | 725539ea03769416d3502feeb4dfcbec3fbb7ae0 (diff) |
Globals: Explicit Consensus::Params arg for main:
-CheckBlockIndex
-DisconnectTip
-GetTransaction
-InvalidateBlock
-ProcessGetData
-ReadBlockFromDisk
Diffstat (limited to 'src/rest.cpp')
-rw-r--r-- | src/rest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rest.cpp b/src/rest.cpp index c46d7a8bd2..5d69542a91 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); |