mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Document RPC error codes
Replace all "magic values" in RPCError(...) by constants.
This commit is contained in:
@@ -150,7 +150,7 @@ Value getblock(const Array& params, bool fHelp)
|
||||
uint256 hash(strHash);
|
||||
|
||||
if (mapBlockIndex.count(hash) == 0)
|
||||
throw JSONRPCError(-5, "Block not found");
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
|
||||
|
||||
CBlock block;
|
||||
CBlockIndex* pblockindex = mapBlockIndex[hash];
|
||||
|
||||
Reference in New Issue
Block a user