Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
79109a4a
Unverified
Commit
79109a4a
authored
Jun 14, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: handle -32600 receipts err code, and always fallback to error message checks
parent
43759e62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
types.go
op-node/sources/types.go
+7
-8
No files found.
op-node/sources/types.go
View file @
79109a4a
...
@@ -266,15 +266,14 @@ type blockHashParameter struct {
...
@@ -266,15 +266,14 @@ type blockHashParameter struct {
func
unusableMethod
(
err
error
)
bool
{
func
unusableMethod
(
err
error
)
bool
{
if
rpcErr
,
ok
:=
err
.
(
rpc
.
Error
);
ok
{
if
rpcErr
,
ok
:=
err
.
(
rpc
.
Error
);
ok
{
code
:=
rpcErr
.
ErrorCode
()
code
:=
rpcErr
.
ErrorCode
()
// method not found, or invalid params
// invalid request, method not found, or invalid params
if
code
==
-
32601
||
code
==
-
32602
{
if
code
==
-
32600
||
code
==
-
32601
||
code
==
-
32602
{
return
true
}
}
else
{
errText
:=
strings
.
ToLower
(
err
.
Error
())
if
strings
.
Contains
(
errText
,
"unknown method"
)
||
strings
.
Contains
(
errText
,
"invalid param"
)
||
strings
.
Contains
(
errText
,
"is not available"
)
{
return
true
return
true
}
}
}
}
return
false
errText
:=
strings
.
ToLower
(
err
.
Error
())
return
strings
.
Contains
(
errText
,
"unsupported method"
)
||
// alchemy -32600 message
strings
.
Contains
(
errText
,
"unknown method"
)
||
strings
.
Contains
(
errText
,
"invalid param"
)
||
strings
.
Contains
(
errText
,
"is not available"
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment