mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-12 19:16:41 +00:00
fix ea42e30d59
This commit is contained in:
parent
2e771eaacf
commit
230c6a5e11
1 changed files with 3 additions and 1 deletions
|
|
@ -256,14 +256,16 @@ func makeFullNode(ctx *cli.Context) *node.Node {
|
|||
}
|
||||
|
||||
cfg.Eth.BlockingPrefetch = ctx.Bool(utils.BlockingPrefetchFlag.Name)
|
||||
|
||||
prefetchWorkers := ctx.Uint(utils.PrefetchWorkersFlag.Name)
|
||||
if ctx.IsSet(utils.PrefetchWorkersFlag.Name) {
|
||||
prefetchWorkers := ctx.Uint(utils.PrefetchWorkersFlag.Name)
|
||||
if prefetchWorkers == 0 {
|
||||
prefetchWorkers = uint(runtime.NumCPU())
|
||||
log.Warn(fmt.Sprintf("invalid value for --bal.prefetchworkers. got 0. sanitizing to %d", prefetchWorkers))
|
||||
}
|
||||
cfg.Eth.PrefetchWorkers = prefetchWorkers
|
||||
}
|
||||
cfg.Eth.PrefetchWorkers = prefetchWorkers
|
||||
|
||||
// Start metrics export if enabled
|
||||
utils.SetupMetrics(&cfg.Metrics)
|
||||
|
|
|
|||
Loading…
Reference in a new issue