From 2bd14237ee2dbab6b19a47f7d1dd463494891551 Mon Sep 17 00:00:00 2001 From: benjyz Date: Thu, 5 Jul 2018 12:48:16 +0200 Subject: [PATCH] fix flags --- cmd/tomo/main.go | 4 ++-- cmd/utils/flags.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/tomo/main.go b/cmd/tomo/main.go index 6a1db28ac0..8963de950c 100644 --- a/cmd/tomo/main.go +++ b/cmd/tomo/main.go @@ -301,7 +301,7 @@ func startNode(ctx *cli.Context, stack *node.Node) { if ok { log.Info("Validator found. Enabling staking mode...") // Use a reduced number of threads if requested - if threads := ctx.GlobalInt(utils.MinerThreadsFlag.Name); threads > 0 { + if threads := ctx.GlobalInt(utils.StakerThreadsFlag.Name); threads > 0 { type threaded interface { SetThreads(threads int) } @@ -337,7 +337,7 @@ func startNode(ctx *cli.Context, stack *node.Node) { } else if !started { log.Info("Masternode found. Enabling staking mode...") // Use a reduced number of threads if requested - if threads := ctx.GlobalInt(utils.MinerThreadsFlag.Name); threads > 0 { + if threads := ctx.GlobalInt(utils.StakerThreadsFlag.Name); threads > 0 { type threaded interface { SetThreads(threads int) } diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index a1ceea6450..998db9dccf 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1054,8 +1054,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) { if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheGCFlag.Name) { cfg.TrieCache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheGCFlag.Name) / 100 } - if ctx.GlobalIsSet(MinerThreadsFlag.Name) { - cfg.MinerThreads = ctx.GlobalInt(MinerThreadsFlag.Name) + if ctx.GlobalIsSet(StakerThreadsFlag.Name) { + cfg.MinerThreads = ctx.GlobalInt(StakerThreadsFlag.Name) } if ctx.GlobalIsSet(DocRootFlag.Name) { cfg.DocRoot = ctx.GlobalString(DocRootFlag.Name)