Commit 81917281 authored by Michael de Hoog's avatar Michael de Hoog

Use opio package instead

parent 3e295455
...@@ -4,9 +4,6 @@ import ( ...@@ -4,9 +4,6 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"os"
"os/signal"
"syscall"
opnode "github.com/ethereum-optimism/optimism/op-node" opnode "github.com/ethereum-optimism/optimism/op-node"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
...@@ -15,6 +12,7 @@ import ( ...@@ -15,6 +12,7 @@ import (
p2pcli "github.com/ethereum-optimism/optimism/op-node/p2p/cli" p2pcli "github.com/ethereum-optimism/optimism/op-node/p2p/cli"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
oplog "github.com/ethereum-optimism/optimism/op-service/log" oplog "github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum-optimism/optimism/op-service/opio"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/core/peer"
...@@ -69,14 +67,7 @@ func Main(cliCtx *cli.Context) error { ...@@ -69,14 +67,7 @@ func Main(cliCtx *cli.Context) error {
go p2pNode.DiscoveryProcess(ctx, logger, config, p2pConfig.TargetPeers()) go p2pNode.DiscoveryProcess(ctx, logger, config, p2pConfig.TargetPeers())
interruptChannel := make(chan os.Signal, 1) opio.BlockOnInterrupts()
signal.Notify(interruptChannel, []os.Signal{
os.Interrupt,
os.Kill,
syscall.SIGTERM,
syscall.SIGQUIT,
}...)
<-interruptChannel
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment