From 52b046c9b6a0f6a280ff797f90784f76bfd310b9 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 18 Apr 2018 12:27:20 +0200 Subject: rpc: clean up IPC handler (#16524) This avoids logging accept errors on shutdown and removes a bit of duplication. It also fixes some goimports lint warnings. --- cmd/clef/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/clef/main.go') diff --git a/cmd/clef/main.go b/cmd/clef/main.go index fb91f4c25..9a1ae91ac 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -23,17 +23,18 @@ import ( "context" "crypto/rand" "crypto/sha256" + "encoding/hex" "encoding/json" "fmt" "io" "io/ioutil" "os" + "os/signal" "os/user" "path/filepath" "runtime" "strings" - "encoding/hex" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" @@ -44,7 +45,6 @@ import ( "github.com/ethereum/go-ethereum/signer/rules" "github.com/ethereum/go-ethereum/signer/storage" "gopkg.in/urfave/cli.v1" - "os/signal" ) // ExternalApiVersion -- see extapi_changelog.md @@ -435,7 +435,7 @@ func signer(c *cli.Context) error { ipcApiUrl = filepath.Join(configDir, "clef.ipc") } - listener, _, err := rpc.StartIPCEndpoint(func() bool { return true }, ipcApiUrl, rpcApi) + listener, _, err := rpc.StartIPCEndpoint(ipcApiUrl, rpcApi) if err != nil { utils.Fatalf("Could not start IPC api: %v", err) } -- cgit v1.2.3