aboutsummaryrefslogtreecommitdiff
path: root/src/rest.cpp
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-05-17 16:30:00 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-05-30 12:23:44 +0900
commite9a1881b90704c6708cfba79d2208debbd4476d0 (patch)
tree0fd589c336747139b3012995e183935023965f02 /src/rest.cpp
parentf8a29ca823fba7fc0eb63896ac4d3d5a0093a023 (diff)
downloadbitcoin-e9a1881b90704c6708cfba79d2208debbd4476d0.tar.xz
refactor: add a function for determining if a block is pruned or not
Diffstat (limited to 'src/rest.cpp')
-rw-r--r--src/rest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rest.cpp b/src/rest.cpp
index ffa75c241f..a5f164497d 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -217,7 +217,7 @@ static bool rest_block(HTTPRequest* req,
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
}
- if (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0)
+ if (IsBlockPruned(pblockindex))
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not available (pruned data)");
if (!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus()))