Merge pull request #4561

04ddf02e Return appropriate RPC error code when key image signature check fails (Michał Sałaban)
This commit is contained in:
Riccardo Spagni 2018-10-26 22:33:35 +02:00
commit c761bee764
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
3 changed files with 15 additions and 1 deletions

View file

@ -3072,6 +3072,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;