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
8f56a3d9
Unverified
Commit
8f56a3d9
authored
Aug 23, 2023
by
OptimismBot
Committed by
GitHub
Aug 23, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6977 from ethereum-optimism/refcell/nit-fix-game-dir-comments
chore(op-challenger): Fix Disk Manager Comments
parents
d0a96753
69a7ed4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
disk.go
op-challenger/fault/disk.go
+3
-3
No files found.
op-challenger/fault/disk.go
View file @
8f56a3d9
...
...
@@ -13,7 +13,7 @@ import (
const
gameDirPrefix
=
"game-"
// diskManager coordinates
// diskManager coordinates
the storage of game data on disk.
type
diskManager
struct
{
datadir
string
}
...
...
@@ -42,11 +42,11 @@ func (d *diskManager) RemoveAllExcept(keep []common.Address) error {
name
:=
entry
.
Name
()[
len
(
gameDirPrefix
)
:
]
addr
:=
common
.
HexToAddress
(
name
)
if
addr
==
(
common
.
Address
{})
{
//
Couldn't parse the directory name to an address so mustn't be a game directory
//
Ignore directories with non-address names.
continue
}
if
slices
.
Contains
(
keep
,
addr
)
{
//
We need to preserve this data
//
Preserve data for games we should keep.
continue
}
if
err
:=
os
.
RemoveAll
(
filepath
.
Join
(
d
.
datadir
,
entry
.
Name
()));
err
!=
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