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
c2b73c58
Unverified
Commit
c2b73c58
authored
Sep 27, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logging: clean up imports and log-util usage
parent
7a27f5d7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
25 deletions
+17
-25
l2_verifier.go
op-e2e/actions/l2_verifier.go
+0
-4
api.go
op-node/node/api.go
+0
-1
server_test.go
op-node/node/server_test.go
+0
-4
state.go
op-node/rollup/driver/state.go
+0
-4
rollupclient.go
op-node/sources/rollupclient.go
+3
-2
main_test.go
op-program/host/cmd/main_test.go
+1
-1
prefetcher_test.go
op-program/host/prefetcher/prefetcher_test.go
+1
-1
retry_test.go
op-program/host/prefetcher/retry_test.go
+7
-5
cli.go
op-service/log/cli.go
+1
-1
price_bump_test.go
op-service/txmgr/price_bump_test.go
+4
-2
No files found.
op-e2e/actions/l2_verifier.go
View file @
c2b73c58
...
@@ -127,10 +127,6 @@ func (s *l2VerifierBackend) SequencerActive(ctx context.Context) (bool, error) {
...
@@ -127,10 +127,6 @@ func (s *l2VerifierBackend) SequencerActive(ctx context.Context) (bool, error) {
return
false
,
nil
return
false
,
nil
}
}
func
(
s
*
l2VerifierBackend
)
SetLogLevel
(
ctx
context
.
Context
,
lvl
string
)
error
{
return
nil
}
func
(
s
*
L2Verifier
)
L2Finalized
()
eth
.
L2BlockRef
{
func
(
s
*
L2Verifier
)
L2Finalized
()
eth
.
L2BlockRef
{
return
s
.
derivation
.
Finalized
()
return
s
.
derivation
.
Finalized
()
}
}
...
...
op-node/node/api.go
View file @
c2b73c58
...
@@ -29,7 +29,6 @@ type driverClient interface {
...
@@ -29,7 +29,6 @@ type driverClient interface {
StartSequencer
(
ctx
context
.
Context
,
blockHash
common
.
Hash
)
error
StartSequencer
(
ctx
context
.
Context
,
blockHash
common
.
Hash
)
error
StopSequencer
(
context
.
Context
)
(
common
.
Hash
,
error
)
StopSequencer
(
context
.
Context
)
(
common
.
Hash
,
error
)
SequencerActive
(
context
.
Context
)
(
bool
,
error
)
SequencerActive
(
context
.
Context
)
(
bool
,
error
)
SetLogLevel
(
ctx
context
.
Context
,
lvl
string
)
error
}
}
type
rpcMetrics
interface
{
type
rpcMetrics
interface
{
...
...
op-node/node/server_test.go
View file @
c2b73c58
...
@@ -224,7 +224,3 @@ func (c *mockDriverClient) StopSequencer(ctx context.Context) (common.Hash, erro
...
@@ -224,7 +224,3 @@ func (c *mockDriverClient) StopSequencer(ctx context.Context) (common.Hash, erro
func
(
c
*
mockDriverClient
)
SequencerActive
(
ctx
context
.
Context
)
(
bool
,
error
)
{
func
(
c
*
mockDriverClient
)
SequencerActive
(
ctx
context
.
Context
)
(
bool
,
error
)
{
return
c
.
Mock
.
MethodCalled
(
"SequencerActive"
)
.
Get
(
0
)
.
(
bool
),
nil
return
c
.
Mock
.
MethodCalled
(
"SequencerActive"
)
.
Get
(
0
)
.
(
bool
),
nil
}
}
func
(
c
*
mockDriverClient
)
SetLogLevel
(
ctx
context
.
Context
,
lvl
string
)
error
{
return
c
.
Mock
.
MethodCalled
(
"SetLogLevel"
)
.
Get
(
0
)
.
(
error
)
}
op-node/rollup/driver/state.go
View file @
c2b73c58
...
@@ -469,10 +469,6 @@ func (s *Driver) SequencerActive(ctx context.Context) (bool, error) {
...
@@ -469,10 +469,6 @@ func (s *Driver) SequencerActive(ctx context.Context) (bool, error) {
}
}
}
}
func
(
s
*
Driver
)
SetLogLevel
(
ctx
context
.
Context
,
lvl
string
)
error
{
return
nil
}
// syncStatus returns the current sync status, and should only be called synchronously with
// syncStatus returns the current sync status, and should only be called synchronously with
// the driver event loop to avoid retrieval of an inconsistent status.
// the driver event loop to avoid retrieval of an inconsistent status.
func
(
s
*
Driver
)
syncStatus
()
*
eth
.
SyncStatus
{
func
(
s
*
Driver
)
syncStatus
()
*
eth
.
SyncStatus
{
...
...
op-node/sources/rollupclient.go
View file @
c2b73c58
...
@@ -5,6 +5,7 @@ import (
...
@@ -5,6 +5,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-node/client"
"github.com/ethereum-optimism/optimism/op-node/client"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup"
...
@@ -59,6 +60,6 @@ func (r *RollupClient) SequencerActive(ctx context.Context) (bool, error) {
...
@@ -59,6 +60,6 @@ func (r *RollupClient) SequencerActive(ctx context.Context) (bool, error) {
return
result
,
err
return
result
,
err
}
}
func
(
r
*
RollupClient
)
SetLogLevel
(
ctx
context
.
Context
,
lvl
string
)
error
{
func
(
r
*
RollupClient
)
SetLogLevel
(
ctx
context
.
Context
,
lvl
log
.
Lvl
)
error
{
return
r
.
rpc
.
CallContext
(
ctx
,
nil
,
"admin_setLogLevel"
,
lvl
)
return
r
.
rpc
.
CallContext
(
ctx
,
nil
,
"admin_setLogLevel"
,
lvl
.
String
()
)
}
}
op-program/host/cmd/main_test.go
View file @
c2b73c58
...
@@ -45,7 +45,7 @@ func TestLogLevel(t *testing.T) {
...
@@ -45,7 +45,7 @@ func TestLogLevel(t *testing.T) {
func
TestLogFormat
(
t
*
testing
.
T
)
{
func
TestLogFormat
(
t
*
testing
.
T
)
{
t
.
Run
(
"RejectInvalid"
,
func
(
t
*
testing
.
T
)
{
t
.
Run
(
"RejectInvalid"
,
func
(
t
*
testing
.
T
)
{
verifyArgsInvalid
(
t
,
"unrecognized log format: foo"
,
addRequiredArgs
(
"--log.format=foo"
))
verifyArgsInvalid
(
t
,
`unrecognized log-format: "foo"`
,
addRequiredArgs
(
"--log.format=foo"
))
})
})
for
_
,
lvl
:=
range
[]
string
{
"json"
,
"json-pretty"
,
"terminal"
,
"text"
,
"logfmt"
}
{
for
_
,
lvl
:=
range
[]
string
{
"json"
,
"json-pretty"
,
"terminal"
,
"text"
,
"logfmt"
}
{
...
...
op-program/host/prefetcher/prefetcher_test.go
View file @
c2b73c58
...
@@ -5,7 +5,6 @@ import (
...
@@ -5,7 +5,6 @@ import (
"math/rand"
"math/rand"
"testing"
"testing"
"github.com/ethereum-optimism/optimism/op-service/testlog"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto"
...
@@ -20,6 +19,7 @@ import (
...
@@ -20,6 +19,7 @@ import (
"github.com/ethereum-optimism/optimism/op-program/client/mpt"
"github.com/ethereum-optimism/optimism/op-program/client/mpt"
"github.com/ethereum-optimism/optimism/op-program/host/kvstore"
"github.com/ethereum-optimism/optimism/op-program/host/kvstore"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/testlog"
)
)
func
TestNoHint
(
t
*
testing
.
T
)
{
func
TestNoHint
(
t
*
testing
.
T
)
{
...
...
op-program/host/prefetcher/retry_test.go
View file @
c2b73c58
...
@@ -5,15 +5,17 @@ import (
...
@@ -5,15 +5,17 @@ import (
"errors"
"errors"
"testing"
"testing"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-node/testutils"
"github.com/ethereum-optimism/optimism/op-node/testutils"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/retry"
"github.com/ethereum-optimism/optimism/op-service/retry"
"github.com/ethereum-optimism/optimism/op-service/testlog"
"github.com/ethereum-optimism/optimism/op-service/testlog"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
)
)
func
TestRetryingL1Source
(
t
*
testing
.
T
)
{
func
TestRetryingL1Source
(
t
*
testing
.
T
)
{
...
...
op-service/log/cli.go
View file @
c2b73c58
...
@@ -121,7 +121,7 @@ func (fv *FormatFlagValue) Set(value string) error {
...
@@ -121,7 +121,7 @@ func (fv *FormatFlagValue) Set(value string) error {
*
fv
=
FormatFlagValue
(
value
)
*
fv
=
FormatFlagValue
(
value
)
return
nil
return
nil
default
:
default
:
return
fmt
.
Errorf
(
"unrecognized
flag
format: %q"
,
value
)
return
fmt
.
Errorf
(
"unrecognized
log-
format: %q"
,
value
)
}
}
}
}
...
...
op-service/txmgr/price_bump_test.go
View file @
c2b73c58
...
@@ -5,9 +5,11 @@ import (
...
@@ -5,9 +5,11 @@ import (
"math/big"
"math/big"
"testing"
"testing"
"github.com/ethereum-optimism/optimism/op-service/testlog"
"github.com/ethereum/go-ethereum/log"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-service/testlog"
)
)
type
priceBumpTest
struct
{
type
priceBumpTest
struct
{
...
...
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