diff --git a/config/config_test.go b/config/config_test.go index 936622b06c..2ad8e32d61 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -773,7 +773,8 @@ func TestLocal_ValidateP2PHybridConfig(t *testing.T) { for i, test := range tests { test := test - t.Run(fmt.Sprintf("test=%d", i), func(t *testing.T) { + name := fmt.Sprintf("test=%d", i) + t.Run(name, func(t *testing.T) { t.Parallel() c := Local{ @@ -782,7 +783,7 @@ func TestLocal_ValidateP2PHybridConfig(t *testing.T) { NetAddress: test.netAddress, } err := c.ValidateP2PHybridConfig() - require.Equal(t, test.err, err != nil, "test=%d", i) + require.Equal(t, test.err, err != nil, name) }) } } diff --git a/network/p2p/pubsub.go b/network/p2p/pubsub.go index a592657010..3dfe08301f 100644 --- a/network/p2p/pubsub.go +++ b/network/p2p/pubsub.go @@ -153,7 +153,7 @@ func (s *serviceImpl) Subscribe(topic string, val pubsub.ValidatorEx) (SubNextCa return nil, err } // t.SetScoreParams() // already set in makePubSub - return t.Subscribe() + return t.Subscribe(pubsub.WithBufferSize(32768)) } // Publish publishes data to the given topic