diff options
author | Michał Sałaban <michal@salaban.info> | 2018-10-11 18:12:17 +0200 |
---|---|---|
committer | Michał Sałaban <michal@salaban.info> | 2018-10-11 18:12:17 +0200 |
commit | 04ddf02e3a6fb5ee4f4777e14625bd2d701add5c (patch) | |
tree | b2dbc06e06d49c5968f3631711a6e7dd90b56e4c /src/wallet/wallet_rpc_server.cpp | |
parent | Merge pull request #4543 (diff) | |
download | monero-04ddf02e3a6fb5ee4f4777e14625bd2d701add5c.tar.xz |
Return appropriate RPC error code when key image signature check fails
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index e0b631aaf..87ee20902 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -2906,6 +2906,11 @@ namespace tools er.code = WALLET_RPC_ERROR_CODE_ADDRESS_INDEX_OUT_OF_BOUNDS; er.message = e.what(); } + catch (const error::signature_check_failed& e) + { + er.code = WALLET_RPC_ERROR_CODE_WRONG_SIGNATURE; + er.message = e.what(); + } catch (const std::exception& e) { er.code = default_error_code; |