mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
d2f4a8cc7c
* Replace ioutil with io and os * Fix build errors
31 lines
574 B
Go
31 lines
574 B
Go
package peers_test
|
|
|
|
import (
|
|
"io"
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags"
|
|
"github.com/prysmaticlabs/prysm/config/features"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
logrus.SetLevel(logrus.DebugLevel)
|
|
logrus.SetOutput(io.Discard)
|
|
|
|
resetCfg := features.InitWithReset(&features.Flags{
|
|
EnablePeerScorer: true,
|
|
})
|
|
defer resetCfg()
|
|
|
|
resetFlags := flags.Get()
|
|
flags.Init(&flags.GlobalFlags{
|
|
BlockBatchLimit: 64,
|
|
BlockBatchLimitBurstFactor: 10,
|
|
})
|
|
defer func() {
|
|
flags.Init(resetFlags)
|
|
}()
|
|
m.Run()
|
|
}
|