Skip to content

Commit

Permalink
network: fix misplaced p2p received TX metric (algorand#6144)
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy authored Oct 28, 2024
1 parent 078aafe commit eff5fb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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)
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion network/p2p/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eff5fb4

Please sign in to comment.