mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-26 14:54:21 +00:00
[rpc] throw JSONRPCError when utxo set can not be read
Github-Pull: #8832 Rebased-From: fa05cfdf256f3bc13b89ea80231e342f4302d204
This commit is contained in:
parent
62886598db
commit
83ad563ade
@ -704,6 +704,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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user