diff --git a/src/rest.cpp b/src/rest.cpp --- a/src/rest.cpp +++ b/src/rest.cpp @@ -314,11 +314,10 @@ return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not available (pruned data)"); } - - if (!ReadBlockFromDisk(block, pblockindex, - config.GetChainParams().GetConsensus())) { - return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found"); - } + } + if (!ReadBlockFromDisk(block, pblockindex, + config.GetChainParams().GetConsensus())) { + return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found"); } switch (rf) {