mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-25 13:07:18 +00:00
Limit incoming connection requests (#1413)
## Issue Addressed Limits the number of incoming connections and adjusts the buffer sizes in libp2p
This commit is contained in:
parent
36d3d37cb4
commit
febb300a2d
@ -103,6 +103,9 @@ impl<TSpec: EthSpec> Service<TSpec> {
|
||||
}
|
||||
}
|
||||
SwarmBuilder::new(transport, behaviour, local_peer_id.clone())
|
||||
.notify_handler_buffer_size(std::num::NonZeroUsize::new(32).expect("Not zero"))
|
||||
.connection_event_buffer_size(64)
|
||||
.incoming_connection_limit(10)
|
||||
.peer_connection_limit(MAX_CONNECTIONS_PER_PEER)
|
||||
.executor(Box::new(Executor(executor)))
|
||||
.build()
|
||||
|
Loading…
Reference in New Issue
Block a user