Skip to content

Commit eff5fb4

Browse files
authored
network: fix misplaced p2p received TX metric (algorand#6144)
1 parent 078aafe commit eff5fb4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

config/config_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,8 @@ func TestLocal_ValidateP2PHybridConfig(t *testing.T) {
773773

774774
for i, test := range tests {
775775
test := test
776-
t.Run(fmt.Sprintf("test=%d", i), func(t *testing.T) {
776+
name := fmt.Sprintf("test=%d", i)
777+
t.Run(name, func(t *testing.T) {
777778
t.Parallel()
778779

779780
c := Local{
@@ -782,7 +783,7 @@ func TestLocal_ValidateP2PHybridConfig(t *testing.T) {
782783
NetAddress: test.netAddress,
783784
}
784785
err := c.ValidateP2PHybridConfig()
785-
require.Equal(t, test.err, err != nil, "test=%d", i)
786+
require.Equal(t, test.err, err != nil, name)
786787
})
787788
}
788789
}

network/p2p/pubsub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (s *serviceImpl) Subscribe(topic string, val pubsub.ValidatorEx) (SubNextCa
153153
return nil, err
154154
}
155155
// t.SetScoreParams() // already set in makePubSub
156-
return t.Subscribe()
156+
return t.Subscribe(pubsub.WithBufferSize(32768))
157157
}
158158

159159
// Publish publishes data to the given topic

0 commit comments

Comments
 (0)