problem: doesn't handle upstream error for additionally allowed methods; allowing an existing method redefines its logic

rel: #67
This commit is contained in:
Igor Artamonov
2021-03-23 18:39:45 -04:00
parent 51c56acd86
commit be33508bb9
12 changed files with 149 additions and 20 deletions

View File

@@ -34,6 +34,11 @@ class TestcaseHandler implements CallHandler {
&& params[0].to?.toLowerCase() == "0xdAC17F958D2ee523a2206206994597C13D831ec7".toLowerCase()) {
return Result.error(-32000, "invalid opcode: opcode 0xfe not defined")
}
// https://github.com/emeraldpay/dshackle/issues/67, when a custom method configured
if (method == "test_foo"
&& params[0].to?.toLowerCase() == "0xdAC17F958D2ee523a2206206994597C13D831ec7".toLowerCase()) {
return Result.error(-32000, "invalid opcode: opcode 0xfe not defined")
}
return null
}
}