mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-06 11:25:02 +00:00
eth/dropper: allow setting maxpeers
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
dce4c36f7b
commit
4644443b10
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue