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
1562126a
Commit
1562126a
authored
Nov 07, 2023
by
Sebastian Stammler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-service: Remove attributes from warn-log in EngineClient
parent
cd156ff9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
engine_client.go
op-service/sources/engine_client.go
+6
-5
No files found.
op-service/sources/engine_client.go
View file @
1562126a
...
@@ -51,20 +51,21 @@ func NewEngineClient(client client.RPC, log log.Logger, metrics caching.Metrics,
...
@@ -51,20 +51,21 @@ func NewEngineClient(client client.RPC, log log.Logger, metrics caching.Metrics,
// 2. `error` as eth.InputError: the forkchoice state or attributes are not valid.
// 2. `error` as eth.InputError: the forkchoice state or attributes are not valid.
// 3. Other types of `error`: temporary RPC errors, like timeouts.
// 3. Other types of `error`: temporary RPC errors, like timeouts.
func
(
s
*
EngineClient
)
ForkchoiceUpdate
(
ctx
context
.
Context
,
fc
*
eth
.
ForkchoiceState
,
attributes
*
eth
.
PayloadAttributes
)
(
*
eth
.
ForkchoiceUpdatedResult
,
error
)
{
func
(
s
*
EngineClient
)
ForkchoiceUpdate
(
ctx
context
.
Context
,
fc
*
eth
.
ForkchoiceState
,
attributes
*
eth
.
PayloadAttributes
)
(
*
eth
.
ForkchoiceUpdatedResult
,
error
)
{
e
:=
s
.
log
.
New
(
"state"
,
fc
,
"attr"
,
attributes
)
llog
:=
s
.
log
.
New
(
"state"
,
fc
)
// local logger
e
.
Trace
(
"Sharing forkchoice-updated signal"
)
tlog
:=
llog
.
New
(
"attr"
,
attributes
)
// trace logger
tlog
.
Trace
(
"Sharing forkchoice-updated signal"
)
fcCtx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
5
)
fcCtx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
5
)
defer
cancel
()
defer
cancel
()
var
result
eth
.
ForkchoiceUpdatedResult
var
result
eth
.
ForkchoiceUpdatedResult
err
:=
s
.
client
.
CallContext
(
fcCtx
,
&
result
,
"engine_forkchoiceUpdatedV2"
,
fc
,
attributes
)
err
:=
s
.
client
.
CallContext
(
fcCtx
,
&
result
,
"engine_forkchoiceUpdatedV2"
,
fc
,
attributes
)
if
err
==
nil
{
if
err
==
nil
{
e
.
Trace
(
"Shared forkchoice-updated signal"
)
tlog
.
Trace
(
"Shared forkchoice-updated signal"
)
if
attributes
!=
nil
{
// block building is optional, we only get a payload ID if we are building a block
if
attributes
!=
nil
{
// block building is optional, we only get a payload ID if we are building a block
e
.
Trace
(
"Received payload id"
,
"payloadId"
,
result
.
PayloadID
)
tlog
.
Trace
(
"Received payload id"
,
"payloadId"
,
result
.
PayloadID
)
}
}
return
&
result
,
nil
return
&
result
,
nil
}
else
{
}
else
{
e
.
Warn
(
"Failed to share forkchoice-updated signal"
,
"err"
,
err
)
llog
.
Warn
(
"Failed to share forkchoice-updated signal"
,
"err"
,
err
)
if
rpcErr
,
ok
:=
err
.
(
rpc
.
Error
);
ok
{
if
rpcErr
,
ok
:=
err
.
(
rpc
.
Error
);
ok
{
code
:=
eth
.
ErrorCode
(
rpcErr
.
ErrorCode
())
code
:=
eth
.
ErrorCode
(
rpcErr
.
ErrorCode
())
switch
code
{
switch
code
{
...
...
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