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
5f9fc4a3
Unverified
Commit
5f9fc4a3
authored
Aug 18, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-challenger: Use game logger for all game components.
parent
3f7933d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
game.go
op-challenger/fault/game.go
+5
-5
No files found.
op-challenger/fault/game.go
View file @
5f9fc4a3
...
@@ -39,6 +39,7 @@ func NewGame(
...
@@ -39,6 +39,7 @@ func NewGame(
txMgr
txmgr
.
TxManager
,
txMgr
txmgr
.
TxManager
,
client
*
ethclient
.
Client
,
client
*
ethclient
.
Client
,
)
(
*
Game
,
error
)
{
)
(
*
Game
,
error
)
{
logger
=
logger
.
New
(
"game"
,
addr
)
contract
,
err
:=
bindings
.
NewFaultDisputeGameCaller
(
addr
,
client
)
contract
,
err
:=
bindings
.
NewFaultDisputeGameCaller
(
addr
,
client
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to bind the fault dispute game contract: %w"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to bind the fault dispute game contract: %w"
,
err
)
...
@@ -74,22 +75,21 @@ func NewGame(
...
@@ -74,22 +75,21 @@ func NewGame(
return
nil
,
fmt
.
Errorf
(
"failed to validate absolute prestate: %w"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to validate absolute prestate: %w"
,
err
)
}
}
gameLogger
:=
logger
.
New
(
"game"
,
addr
)
responder
,
err
:=
NewFaultResponder
(
logger
,
txMgr
,
addr
)
responder
,
err
:=
NewFaultResponder
(
gameLogger
,
txMgr
,
addr
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to create the responder: %w"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to create the responder: %w"
,
err
)
}
}
caller
,
err
:=
NewFaultCallerFromBindings
(
addr
,
client
,
gameL
ogger
)
caller
,
err
:=
NewFaultCallerFromBindings
(
addr
,
client
,
l
ogger
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to bind the fault contract: %w"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to bind the fault contract: %w"
,
err
)
}
}
return
&
Game
{
return
&
Game
{
agent
:
NewAgent
(
loader
,
int
(
gameDepth
),
provider
,
responder
,
updater
,
cfg
.
AgreeWithProposedOutput
,
gameL
ogger
),
agent
:
NewAgent
(
loader
,
int
(
gameDepth
),
provider
,
responder
,
updater
,
cfg
.
AgreeWithProposedOutput
,
l
ogger
),
agreeWithProposedOutput
:
cfg
.
AgreeWithProposedOutput
,
agreeWithProposedOutput
:
cfg
.
AgreeWithProposedOutput
,
caller
:
caller
,
caller
:
caller
,
logger
:
gameL
ogger
,
logger
:
l
ogger
,
},
nil
},
nil
}
}
...
...
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