Permalink
Please sign in to comment.
Browse files
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: c119096
- Loading branch information...
Showing
with
31 additions
and 47 deletions.
- +9 −21 qa/rpc-tests/p2p-acceptblock.py
- +11 −20 qa/rpc-tests/pruning.py
- +11 −6 src/rpc/blockchain.cpp
0 comments on commit
fe51c89