diff options
author | John Newbery <john@johnnewbery.com> | 2017-02-09 16:39:18 -0500 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-03-07 16:45:09 -0500 |
commit | c1190963b388590dc0a346bf625c7e84f69cee8d (patch) | |
tree | d7e1ebf7427eb93770d37ac516b66cbd65c703f8 /qa/rpc-tests/bip65-cltv-p2p.py | |
parent | 6d07c62322f60eb2702c6654e994fc353bcfcf8c (diff) |
Return correct error codes in blockchain.cpp.
RPCs in blockchain.cpp were returning misleading or incorrect error
codes (for example getblock() returning RPC_INTERNAL_ERROR when the
block had been pruned). This commit fixes those error codes:
- RPC_INTERNAL_ERROR should not be returned for application-level
errors, only for genuine internal errors such as corrupted data.
- RPC_METHOD_NOT_FOUND should not be returned in response to a
JSON request for an existing method.
Those error codes have been replaced with RPC_MISC_ERROR or
RPC_INVALID_PARAMETER as appropriate.
Diffstat (limited to 'qa/rpc-tests/bip65-cltv-p2p.py')
0 files changed, 0 insertions, 0 deletions