Skip to content

Commit fa05cfd

Browse files
author
MarcoFalke
committed
[rpc] throw JSONRPCError when utxo set can not be read
1 parent 14e8f99 commit fa05cfd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rpc/blockchain.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,8 @@ UniValue gettxoutsetinfo(const UniValue& params, bool fHelp)
848848
ret.push_back(Pair("bytes_serialized", (int64_t)stats.nSerializedSize));
849849
ret.push_back(Pair("hash_serialized", stats.hashSerialized.GetHex()));
850850
ret.push_back(Pair("total_amount", ValueFromAmount(stats.nTotalAmount)));
851+
} else {
852+
throw JSONRPCError(RPC_INTERNAL_ERROR, "Unable to read UTXO set");
851853
}
852854
return ret;
853855
}

0 commit comments

Comments
 (0)