diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-01-12 23:30:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 23:30:19 +0800 |
commit | 3f40b22dac9cb36fdf2baacf4789a52adbb611fd (patch) | |
tree | 593fe45e2f69d5e02a1e6aa5a38800eab90a1bb2 | |
parent | fd869dc839e2b3696e130224a43b9b25455ceb46 (diff) | |
parent | bd0dbfa2a889972814166129e3a166cec7c71951 (diff) | |
download | go-tangerine-3f40b22dac9cb36fdf2baacf4789a52adbb611fd.tar.gz go-tangerine-3f40b22dac9cb36fdf2baacf4789a52adbb611fd.tar.zst go-tangerine-3f40b22dac9cb36fdf2baacf4789a52adbb611fd.zip |
Merge pull request #15863 from karalabe/light-miner-error
cmd/geth: user friendly light miner error
-rw-r--r-- | cmd/geth/main.go | 5 |
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(ð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 { |