diff --git a/cmd/swarm/explore.go b/cmd/swarm/explore.go index 0add64900a..5f83a57abc 100644 --- a/cmd/swarm/explore.go +++ b/cmd/swarm/explore.go @@ -1,4 +1,4 @@ -// Copyright 2016 The go-ethereum Authors +// Copyright 2019 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify @@ -28,15 +28,15 @@ import ( ) var chunkExploreCommand = cli.Command{ - Action: explore, + Action: hashes, CustomHelpTemplate: helpTemplate, - Name: "explore", + Name: "hashes", Usage: "print all hashes of a file to STDOUT", ArgsUsage: "", Description: "Prints all hashes of a file to STDOUT", } -func explore(ctx *cli.Context) { +func hashes(ctx *cli.Context) { args := ctx.Args() if len(args) < 1 { utils.Fatalf("Usage: swarm explore ") diff --git a/cmd/swarm/swarm-smoke/chunkExplorer.go b/cmd/swarm/swarm-smoke/chunkExplorer.go deleted file mode 100644 index f50ee3adf0..0000000000 --- a/cmd/swarm/swarm-smoke/chunkExplorer.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2018 The go-ethereum Authors -// This file is part of go-ethereum. -// -// go-ethereum is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// go-ethereum is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . - -package main - -import ( - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rpc" - cli "gopkg.in/urfave/cli.v1" -) - -var ( - addr string -) - -func chunkExplorer(c *cli.Context) error { - log.Debug("generate endpoints...") - generateEndpoints(scheme, cluster, appName, from, to) - log.Debug("done.") - - var has bool - for _, e := range endpoints { - e = e + ":8546" - log.Debug("dialing...." + e) - client, _ := rpc.Dial(e) - log.Debug("Trying...." + e) - if err := client.Call(&has, "debugapi_hasChunk", addr); err != nil { - log.Error("Error requesting hasChunk from endpoint", "endpoint", e, "chunkAddress", addr, "err", err) - } else { - if has { - log.Info("Endpoint "+e+" reports to HAVE chunk", "chunk", addr) - } else { - log.Info("Endpoint "+e+" reports to NOT have chunk", "chunk", addr) - } - } - } - return nil -} diff --git a/cmd/swarm/swarm-smoke/main.go b/cmd/swarm/swarm-smoke/main.go index c5ce718f5e..5596714605 100644 --- a/cmd/swarm/swarm-smoke/main.go +++ b/cmd/swarm/swarm-smoke/main.go @@ -88,12 +88,6 @@ func main() { Usage: "http or https", Destination: &scheme, }, - cli.StringFlag{ - Name: "addr", - Value: "", - Usage: "chunk address", - Destination: &addr, - }, cli.BoolFlag{ Name: "include-localhost", Usage: "whether to include localhost:8500 as an endpoint", @@ -166,12 +160,6 @@ func main() { Usage: "measure network aggregate capacity", Action: wrapCliCommand("sliding-window", false, slidingWindow), }, - { - Name: "chunk_explorer", - Aliases: []string{"x"}, - Usage: "query nodes if they are storing a specific chunk (by address)", - Action: wrapCliCommand("chunkExplorer", false, chunkExplorer), - }, } sort.Sort(cli.FlagsByName(app.Flags))