mirror of https://github.com/certusone/vouch.git
Set default process concurrency
This commit is contained in:
parent
4484ea0b5e
commit
13f5d5eeaf
|
@ -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
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue