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
2f745cb5
Unverified
Commit
2f745cb5
authored
Sep 04, 2023
by
OptimismBot
Committed by
GitHub
Sep 04, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6853 from Flocqst/op-service/http-util-cleanup
Op service : http util cleanup
parents
65fe9cf9
8538d0b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
15 deletions
+4
-15
main.go
op-node/cmd/stateviz/main.go
+1
-1
metrics.go
op-node/metrics/metrics.go
+1
-1
server.go
op-node/node/server.go
+1
-1
http.go
op-service/httputil/http.go
+1
-1
server.go
op-service/httputil/server.go
+0
-11
No files found.
op-node/cmd/stateviz/main.go
View file @
2f745cb5
...
...
@@ -18,8 +18,8 @@ import (
"sync"
"time"
ophttp
"github.com/ethereum-optimism/optimism/op-node/http"
"github.com/ethereum-optimism/optimism/op-service/eth"
ophttp
"github.com/ethereum-optimism/optimism/op-service/httputil"
"github.com/ethereum/go-ethereum/log"
)
...
...
op-node/metrics/metrics.go
View file @
2f745cb5
...
...
@@ -10,8 +10,8 @@ import (
"strconv"
"time"
ophttp
"github.com/ethereum-optimism/optimism/op-node/http"
"github.com/ethereum-optimism/optimism/op-node/p2p/store"
ophttp
"github.com/ethereum-optimism/optimism/op-service/httputil"
"github.com/ethereum-optimism/optimism/op-service/metrics"
pb
"github.com/libp2p/go-libp2p-pubsub/pb"
...
...
op-node/node/server.go
View file @
2f745cb5
...
...
@@ -7,7 +7,7 @@ import (
"net/http"
"strconv"
ophttp
"github.com/ethereum-optimism/optimism/op-
node/http
"
ophttp
"github.com/ethereum-optimism/optimism/op-
service/httputil
"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/rpc"
...
...
op-
node/http
/http.go
→
op-
service/httputil
/http.go
View file @
2f745cb5
package
http
package
http
util
import
(
"net/http"
...
...
op-service/httputil/server.go
View file @
2f745cb5
...
...
@@ -3,9 +3,7 @@ package httputil
import
(
"context"
"errors"
"fmt"
"net/http"
"time"
)
func
ListenAndServeContext
(
ctx
context
.
Context
,
server
*
http
.
Server
)
error
{
...
...
@@ -14,15 +12,6 @@ func ListenAndServeContext(ctx context.Context, server *http.Server) error {
errCh
<-
server
.
ListenAndServe
()
}()
// verify that the server comes up
tick
:=
time
.
NewTimer
(
10
*
time
.
Millisecond
)
select
{
case
err
:=
<-
errCh
:
return
fmt
.
Errorf
(
"http server failed: %w"
,
err
)
case
<-
tick
.
C
:
break
}
select
{
case
err
:=
<-
errCh
:
if
errors
.
Is
(
err
,
http
.
ErrServerClosed
)
{
...
...
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