eth/dropper: allow setting maxpeers

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2025-05-03 01:02:56 +02:00
parent dce4c36f7b
commit 4644443b10
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -88,6 +88,11 @@ func newDropper(maxDialPeers, maxInboundPeers int) *dropper {
return cm
}
func (cm *dropper) SetMaxPeers(maxDialPeers, maxInboundPeers int) {
cm.maxDialPeers = maxDialPeers
cm.maxInboundPeers = maxInboundPeers
}
// Start the dropper.
func (cm *dropper) Start(srv *p2p.Server, syncingFunc getSyncingFunc) {
cm.peersFunc = srv.Peers