diff options
| author | John Newbery <[email protected]> | 2017-02-09 16:39:18 -0500 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2017-06-05 19:01:16 +0000 |
| commit | fe51c8924e62bf146a722f632324c99c2f97bc75 (patch) | |
| tree | 04981c77e5cf65b1e66cafba77f3ad2a37cf7958 /src/init.cpp | |
| parent | Return correct error codes in bumpfee(). (diff) | |
| download | discoin-fe51c8924e62bf146a722f632324c99c2f97bc75.tar.xz discoin-fe51c8924e62bf146a722f632324c99c2f97bc75.zip | |
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.
Github-Pull: #9853
Rebased-From: c1190963b388590dc0a346bf625c7e84f69cee8d
Diffstat (limited to 'src/init.cpp')
0 files changed, 0 insertions, 0 deletions