diff --git a/internal/p2p/pex/reactor.go b/internal/p2p/pex/reactor.go index 964d85bb9..29132a876 100644 --- a/internal/p2p/pex/reactor.go +++ b/internal/p2p/pex/reactor.go @@ -259,7 +259,7 @@ func (r *Reactor) handlePexMessage(ctx context.Context, envelope *p2p.Envelope) // Verify that the response does not exceed the safety limit. if len(msg.Addresses) > maxAddresses { - return 0, fmt.Errorf("Peer sent too many addresses (%d > maxiumum %d)", + return 0, fmt.Errorf("peer sent too many addresses (%d > maxiumum %d)", len(msg.Addresses), maxAddresses) } diff --git a/internal/p2p/pex/reactor_test.go b/internal/p2p/pex/reactor_test.go index c7a0f5934..356d7f435 100644 --- a/internal/p2p/pex/reactor_test.go +++ b/internal/p2p/pex/reactor_test.go @@ -189,7 +189,7 @@ func TestReactorErrorsOnReceivingTooManyPeers(t *testing.T) { peerErr := <-r.pexErrCh require.Error(t, peerErr.Err) require.Empty(t, r.pexOutCh) - require.Contains(t, peerErr.Err.Error(), "Peer sent too many addresses") + require.Contains(t, peerErr.Err.Error(), "peer sent too many addresses") require.Equal(t, peer.NodeID, peerErr.NodeID) }