From bd0dbfa2a889972814166129e3a166cec7c71951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 12 Jan 2018 11:59:18 +0200 Subject: cmd/geth: user friendly light miner error --- cmd/geth/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd') 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(ðereum); 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 { -- cgit v1.2.3