Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle new errors raised by geth v1.9.15 #6657

Merged
merged 1 commit into from
Nov 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion raiden/network/rpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,11 @@ def inspect_client_error(
if "insufficient funds" in error["message"]:
return ClientErrorInspectResult.INSUFFICIENT_FUNDS

if "always failing transaction" in error["message"]:
if (
"always failing transaction" in error["message"]
or "execution reverted" in error["message"]
or "invalid opcode: opcode 0xfe not defined" in error["message"]
):
return ClientErrorInspectResult.ALWAYS_FAIL

if "replacement transaction underpriced" in error["message"]:
Expand Down Expand Up @@ -543,6 +547,15 @@ def check_value_error_for_parity(value_error: ValueError, call_type: ParityCallT
code_checks_out = error_data["code"] == -32016
message_checks_out = "The execution failed due to an exception" in error_data["message"]
elif call_type == ParityCallType.CALL:
# TODO: refactor
# TODO: rename
if (
error_data["code"] == -32000
and "invalid opcode: opcode 0xfe not defined" in error_data["message"]
):
return True
if error_data["code"] == -32000 and "execution reverted" in error_data["message"]:
return True
code_checks_out = error_data["code"] == -32015
message_checks_out = "VM execution error" in error_data["message"]
else:
Expand Down