fix flags

This commit is contained in:
benjyz 2018-07-05 12:48:16 +02:00
parent f394faf509
commit 2bd14237ee
2 changed files with 4 additions and 4 deletions

View file

@ -301,7 +301,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
if ok { if ok {
log.Info("Validator found. Enabling staking mode...") log.Info("Validator found. Enabling staking mode...")
// Use a reduced number of threads if requested // 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 { type threaded interface {
SetThreads(threads int) SetThreads(threads int)
} }
@ -337,7 +337,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
} else if !started { } else if !started {
log.Info("Masternode found. Enabling staking mode...") log.Info("Masternode found. Enabling staking mode...")
// Use a reduced number of threads if requested // 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 { type threaded interface {
SetThreads(threads int) SetThreads(threads int)
} }

View file

@ -1054,8 +1054,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheGCFlag.Name) { if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheGCFlag.Name) {
cfg.TrieCache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheGCFlag.Name) / 100 cfg.TrieCache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheGCFlag.Name) / 100
} }
if ctx.GlobalIsSet(MinerThreadsFlag.Name) { if ctx.GlobalIsSet(StakerThreadsFlag.Name) {
cfg.MinerThreads = ctx.GlobalInt(MinerThreadsFlag.Name) cfg.MinerThreads = ctx.GlobalInt(StakerThreadsFlag.Name)
} }
if ctx.GlobalIsSet(DocRootFlag.Name) { if ctx.GlobalIsSet(DocRootFlag.Name) {
cfg.DocRoot = ctx.GlobalString(DocRootFlag.Name) cfg.DocRoot = ctx.GlobalString(DocRootFlag.Name)