Return appropriate RPC error code when key image signature check fails

This commit is contained in:
Michał Sałaban 2018-10-11 18:12:17 +02:00
parent 77e1ebff26
commit 04ddf02e3a
3 changed files with 15 additions and 1 deletions

View file

@ -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;