diff options
| author | Karl-Johan Alm <[email protected]> | 2018-05-17 16:30:00 +0900 |
|---|---|---|
| committer | Karl-Johan Alm <[email protected]> | 2018-05-30 12:23:44 +0900 |
| commit | e9a1881b90704c6708cfba79d2208debbd4476d0 (patch) | |
| tree | 0fd589c336747139b3012995e183935023965f02 /src/rpc/blockchain.cpp | |
| parent | Merge #13215: Travis: Build tests on Ubuntu 18.04 with docker (diff) | |
| download | discoin-e9a1881b90704c6708cfba79d2208debbd4476d0.tar.xz discoin-e9a1881b90704c6708cfba79d2208debbd4476d0.zip | |
refactor: add a function for determining if a block is pruned or not
Diffstat (limited to 'src/rpc/blockchain.cpp')
| -rw-r--r-- | src/rpc/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 24fb522e6..ea9eb3eca 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -742,7 +742,7 @@ static UniValue getblockheader(const JSONRPCRequest& request) static CBlock GetBlockChecked(const CBlockIndex* pblockindex) { CBlock block; - if (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0) { + if (IsBlockPruned(pblockindex)) { throw JSONRPCError(RPC_MISC_ERROR, "Block not available (pruned data)"); } |