aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-10-29 01:05:01 +0800
committerFelix Lange <fjl@twurst.com>2016-10-29 01:05:01 +0800
commit289b30715d097edafd5562f66cb3567a70b2d330 (patch)
tree7eaaa6da97c84727469303b986e364606ece57ce /cmd
parent77703045765343c489ded2f43e3ed0f332c5f148 (diff)
downloaddexon-289b30715d097edafd5562f66cb3567a70b2d330.tar
dexon-289b30715d097edafd5562f66cb3567a70b2d330.tar.gz
dexon-289b30715d097edafd5562f66cb3567a70b2d330.tar.bz2
dexon-289b30715d097edafd5562f66cb3567a70b2d330.tar.lz
dexon-289b30715d097edafd5562f66cb3567a70b2d330.tar.xz
dexon-289b30715d097edafd5562f66cb3567a70b2d330.tar.zst
dexon-289b30715d097edafd5562f66cb3567a70b2d330.zip
Godeps, vendor: convert dependency management to trash (#3198)
This commit converts the dependency management from Godeps to the vendor folder, also switching the tool from godep to trash. Since the upstream tool lacks a few features proposed via a few PRs, until those PRs are merged in (if), use github.com/karalabe/trash. You can update dependencies via trash --update. All dependencies have been updated to their latest version. Parts of the build system are reworked to drop old notions of Godeps and invocation of the go vet command so that it doesn't run against the vendor folder, as that will just blow up during vetting. The conversion drops OpenCL (and hence GPU mining support) from ethash and our codebase. The short reasoning is that there's noone to maintain and having opencl libs in our deps messes up builds as go install ./... tries to build them, failing with unsatisfied link errors for the C OpenCL deps. golang.org/x/net/context is not vendored in. We expect it to be fetched by the user (i.e. using go get). To keep ci.go builds reproducible the package is "vendored" in build/_vendor.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/main.go44
-rw-r--r--cmd/geth/usage.go1
-rw-r--r--cmd/utils/flags.go5
3 files changed, 1 insertions, 49 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index ccc42d3cf..551705208 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -85,22 +85,6 @@ Regular users do not need to execute it.
`,
},
{
- Action: gpuinfo,
- Name: "gpuinfo",
- Usage: "gpuinfo",
- Description: `
-Prints OpenCL device info for all found GPUs.
-`,
- },
- {
- Action: gpubench,
- Name: "gpubench",
- Usage: "benchmark GPU",
- Description: `
-Runs quick benchmark on first GPU found.
-`,
- },
- {
Action: version,
Name: "version",
Usage: "print ethereum version numbers",
@@ -147,7 +131,6 @@ participating.
utils.OpposeDAOFork,
utils.MinerThreadsFlag,
utils.MiningEnabledFlag,
- utils.MiningGPUFlag,
utils.AutoDAGFlag,
utils.TargetGasLimitFlag,
utils.NATFlag,
@@ -312,7 +295,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
if err := stack.Service(&ethereum); err != nil {
utils.Fatalf("ethereum service not running: %v", err)
}
- if err := ethereum.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name), ctx.GlobalString(utils.MiningGPUFlag.Name)); err != nil {
+ if err := ethereum.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name)); err != nil {
utils.Fatalf("Failed to start mining: %v", err)
}
}
@@ -348,31 +331,6 @@ func makedag(ctx *cli.Context) error {
return nil
}
-func gpuinfo(ctx *cli.Context) error {
- eth.PrintOpenCLDevices()
- return nil
-}
-
-func gpubench(ctx *cli.Context) error {
- args := ctx.Args()
- wrongArgs := func() {
- utils.Fatalf(`Usage: geth gpubench <gpu number>`)
- }
- switch {
- case len(args) == 1:
- n, err := strconv.ParseUint(args[0], 0, 64)
- if err != nil {
- wrongArgs()
- }
- eth.GPUBench(n)
- case len(args) == 0:
- eth.GPUBench(0)
- default:
- wrongArgs()
- }
- return nil
-}
-
func version(c *cli.Context) error {
fmt.Println(strings.Title(clientIdentifier))
fmt.Println("Version:", utils.Version)
diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go
index 2cb6e77e8..4c4e27630 100644
--- a/cmd/geth/usage.go
+++ b/cmd/geth/usage.go
@@ -128,7 +128,6 @@ var AppHelpFlagGroups = []flagGroup{
Flags: []cli.Flag{
utils.MiningEnabledFlag,
utils.MinerThreadsFlag,
- utils.MiningGPUFlag,
utils.AutoDAGFlag,
utils.EtherbaseFlag,
utils.TargetGasLimitFlag,
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 1859f735d..5e2dcf8c9 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -170,7 +170,6 @@ var (
Usage: "Updates the chain rules to oppose the DAO hard-fork",
}
// Miner settings
- // TODO: refactor CPU vs GPU mining flags
MiningEnabledFlag = cli.BoolFlag{
Name: "mine",
Usage: "Enable mining",
@@ -180,10 +179,6 @@ var (
Usage: "Number of CPU threads to use for mining",
Value: runtime.NumCPU(),
}
- MiningGPUFlag = cli.StringFlag{
- Name: "minergpus",
- Usage: "List of GPUs to use for mining (e.g. '0,1' will use the first two GPUs found)",
- }
TargetGasLimitFlag = cli.StringFlag{
Name: "targetgaslimit",
Usage: "Target gas limit sets the artificial target gas floor for the blocks to mine",