aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-01-12 17:59:18 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-12 17:59:18 +0800
commitbd0dbfa2a889972814166129e3a166cec7c71951 (patch)
tree1faedfffee0f3f287f9197bffe743205c6095ae9 /cmd
parent56152b31ac251d1cc68fcddbdad159ba5234c415 (diff)
downloadgo-tangerine-bd0dbfa2a889972814166129e3a166cec7c71951.tar
go-tangerine-bd0dbfa2a889972814166129e3a166cec7c71951.tar.gz
go-tangerine-bd0dbfa2a889972814166129e3a166cec7c71951.tar.bz2
go-tangerine-bd0dbfa2a889972814166129e3a166cec7c71951.tar.lz
go-tangerine-bd0dbfa2a889972814166129e3a166cec7c71951.tar.xz
go-tangerine-bd0dbfa2a889972814166129e3a166cec7c71951.tar.zst
go-tangerine-bd0dbfa2a889972814166129e3a166cec7c71951.zip
cmd/geth: user friendly light miner error
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index bdb7fad62..b955bd243 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -278,9 +278,12 @@ func startNode(ctx *cli.Context, stack *node.Node) {
// Start auxiliary services if enabled
if ctx.GlobalBool(utils.MiningEnabledFlag.Name) || ctx.GlobalBool(utils.DeveloperFlag.Name) {
// Mining only makes sense if a full Ethereum node is running
+ if ctx.GlobalBool(utils.LightModeFlag.Name) || ctx.GlobalString(utils.SyncModeFlag.Name) == "light" {
+ utils.Fatalf("Light clients do not support mining")
+ }
var ethereum *eth.Ethereum
if err := stack.Service(&ethereum); err != nil {
- utils.Fatalf("ethereum service not running: %v", err)
+ utils.Fatalf("Ethereum service not running: %v", err)
}
// Use a reduced number of threads if requested
if threads := ctx.GlobalInt(utils.MinerThreadsFlag.Name); threads > 0 {