mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
fix flags
This commit is contained in:
parent
f394faf509
commit
2bd14237ee
2 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue