diff --git a/src/rpc/avalanche.cpp b/src/rpc/avalanche.cpp --- a/src/rpc/avalanche.cpp +++ b/src/rpc/avalanche.cpp @@ -463,7 +463,7 @@ avalanche::Proof proof; bilingual_str error; if (!avalanche::Proof::FromHex(proof, request.params[0].get_str(), error)) { - throw JSONRPCError(RPC_INVALID_PARAMETER, error.original); + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, error.original); } NodeContext &node = EnsureNodeContext(request.context); diff --git a/test/functional/abc_rpc_avalancheproof.py b/test/functional/abc_rpc_avalancheproof.py --- a/test/functional/abc_rpc_avalancheproof.py +++ b/test/functional/abc_rpc_avalancheproof.py @@ -234,10 +234,10 @@ self.log.info("Check the verifyavalancheproof RPC") - assert_raises_rpc_error(-8, "Proof must be an hexadecimal string", - node.verifyavalancheproof, "f00") - assert_raises_rpc_error(-8, "Proof has invalid format", - node.verifyavalancheproof, "f00d") + assert_raises_rpc_error(-22, "Proof must be an hexadecimal string", + node.verifyavalancheproof, "f00") + assert_raises_rpc_error(-22, "Proof has invalid format", + node.verifyavalancheproof, "f00d") def check_verifyavalancheproof_failure(proof, message): assert_raises_rpc_error(-8, "The proof is invalid: " + message,