From 2fff8085517d71f1a158777bfc22a1c4fb7469a5 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 28 Sep 2016 21:05:11 +0200 Subject: [PATCH] [rpc] throw JSONRPCError when utxo set can not be read Github-Pull: #8832 Rebased-From: fa05cfdf256f3bc13b89ea80231e342f4302d204 --- src/rpc/blockchain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 3f800b86e..2d1ee338c 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -583,6 +583,8 @@ UniValue gettxoutsetinfo(const UniValue& params, bool fHelp) ret.push_back(Pair("bytes_serialized", (int64_t)stats.nSerializedSize)); ret.push_back(Pair("hash_serialized", stats.hashSerialized.GetHex())); ret.push_back(Pair("total_amount", ValueFromAmount(stats.nTotalAmount))); + } else { + throw JSONRPCError(RPC_INTERNAL_ERROR, "Unable to read UTXO set"); } return ret; }