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
4163278e
Unverified
Commit
4163278e
authored
Jun 26, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: Improve CLI usage and inline err check
parent
3d19b6d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
flags.go
op-node/flags/flags.go
+1
-1
config_persistence.go
op-node/node/config_persistence.go
+1
-2
No files found.
op-node/flags/flags.go
View file @
4163278e
...
...
@@ -63,7 +63,7 @@ var (
}
RPCAdminPersistence
=
&
cli
.
StringFlag
{
Name
:
"rpc.admin-state"
,
Usage
:
"File path used to persist state changes made via the admin API so they persist across restarts"
,
Usage
:
"File path used to persist state changes made via the admin API so they persist across restarts
. Disabled if not set.
"
,
EnvVars
:
prefixEnvVars
(
"RPC_ADMIN_STATE"
),
}
L1TrustRPC
=
&
cli
.
BoolFlag
{
...
...
op-node/node/config_persistence.go
View file @
4163278e
...
...
@@ -71,8 +71,7 @@ func (p *ActiveConfigPersistence) persist(sequencerStarted bool) error {
return
fmt
.
Errorf
(
"open file (%v) for writing: %w"
,
tmpFile
,
err
)
}
defer
file
.
Close
()
// Ensure file is closed even if write or sync fails
_
,
err
=
file
.
Write
(
data
)
if
err
!=
nil
{
if
_
,
err
=
file
.
Write
(
data
);
err
!=
nil
{
return
fmt
.
Errorf
(
"write new config to temp file (%v): %w"
,
tmpFile
,
err
)
}
if
err
:=
file
.
Sync
();
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