Set default process concurrency

This commit is contained in:
Jim McDonald 2020-10-28 19:36:17 +00:00
parent 4484ea0b5e
commit 13f5d5eeaf
No known key found for this signature in database
GPG Key ID: 89CEB61B2AD2A5E7
2 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,5 @@
Development
- add a default process concurrency for strategies
- fix race condition in "first" beacon block proposal strategy
- tidy up trace logging for scheduler

View File

@ -17,6 +17,7 @@ package best
import (
"context"
"runtime"
"time"
eth2client "github.com/attestantio/go-eth2-client"
@ -83,9 +84,10 @@ func WithTimeout(timeout time.Duration) Parameter {
// parseAndCheckParameters parses and checks parameters to ensure that mandatory parameters are present and correct.
func parseAndCheckParameters(params ...Parameter) (*parameters, error) {
parameters := parameters{
logLevel: zerolog.GlobalLevel(),
timeout: 2 * time.Second,
clientMonitor: nullmetrics.New(context.Background()),
logLevel: zerolog.GlobalLevel(),
timeout: 2 * time.Second,
clientMonitor: nullmetrics.New(context.Background()),
processConcurrency: int64(runtime.GOMAXPROCS(-1)),
}
for _, p := range params {
if params != nil {