This commit is contained in:
Jared Wasinger 2026-05-06 19:08:50 -04:00
parent 2e771eaacf
commit 230c6a5e11

View file

@ -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)