2020-08-01 09:20:05 +00:00
|
|
|
package peers_test
|
|
|
|
|
|
|
|
import (
|
2022-04-18 20:42:07 +00:00
|
|
|
"io"
|
2020-08-01 09:20:05 +00:00
|
|
|
"testing"
|
|
|
|
|
2022-08-16 12:20:13 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v3/cmd/beacon-chain/flags"
|
|
|
|
"github.com/prysmaticlabs/prysm/v3/config/features"
|
2020-08-01 09:20:05 +00:00
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
2020-12-04 16:10:07 +00:00
|
|
|
logrus.SetLevel(logrus.DebugLevel)
|
2022-04-18 20:42:07 +00:00
|
|
|
logrus.SetOutput(io.Discard)
|
2020-08-01 09:20:05 +00:00
|
|
|
|
2021-09-15 01:18:39 +00:00
|
|
|
resetCfg := features.InitWithReset(&features.Flags{
|
2020-12-04 16:10:07 +00:00
|
|
|
EnablePeerScorer: true,
|
|
|
|
})
|
|
|
|
defer resetCfg()
|
2020-08-01 09:20:05 +00:00
|
|
|
|
2020-12-04 16:10:07 +00:00
|
|
|
resetFlags := flags.Get()
|
|
|
|
flags.Init(&flags.GlobalFlags{
|
|
|
|
BlockBatchLimit: 64,
|
|
|
|
BlockBatchLimitBurstFactor: 10,
|
|
|
|
})
|
|
|
|
defer func() {
|
|
|
|
flags.Init(resetFlags)
|
|
|
|
}()
|
|
|
|
m.Run()
|
2020-08-01 09:20:05 +00:00
|
|
|
}
|