mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-12 04:30:04 +00:00
Revert Inbound Peer Limit (#8155)
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
72dc43989f
commit
ea88799585
@ -55,13 +55,13 @@ const (
|
||||
|
||||
const (
|
||||
// ColocationLimit restricts how many peer identities we can see from a single ip or ipv6 subnet.
|
||||
ColocationLimit = 7
|
||||
ColocationLimit = 5
|
||||
|
||||
// Additional buffer beyond current peer limit, from which we can store the relevant peer statuses.
|
||||
maxLimitBuffer = 150
|
||||
|
||||
// InboundRatio is the proportion of our connected peer limit at which we will allow inbound peers.
|
||||
InboundRatio = float64(2) / 5
|
||||
InboundRatio = float64(1)
|
||||
)
|
||||
|
||||
// Status is the structure holding the peer status information.
|
||||
|
@ -650,7 +650,7 @@ func TestAtInboundPeerLimit(t *testing.T) {
|
||||
createPeer(t, p, nil, network.DirOutbound, peerdata.PeerConnectionState(ethpb.ConnectionState_CONNECTED))
|
||||
}
|
||||
assert.Equal(t, false, p.IsAboveInboundLimit(), "Inbound limit exceeded")
|
||||
for i := 0; i < 15; i++ {
|
||||
for i := 0; i < 31; i++ {
|
||||
// Peer added to peer handler.
|
||||
createPeer(t, p, nil, network.DirInbound, peerdata.PeerConnectionState(ethpb.ConnectionState_CONNECTED))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user