mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
les: show warning log for limited light peer count
This commit is contained in:
parent
462644af37
commit
8ac0362647
1 changed files with 5 additions and 1 deletions
|
|
@ -223,11 +223,15 @@ func (pm *ProtocolManager) Start(maxPeers int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
freePeers := pm.maxFreePeers(0, 0)
|
||||||
|
if freePeers < maxPeers {
|
||||||
|
log.Warn("Light peer count limited", "specified", maxPeers, "allowed", freePeers)
|
||||||
|
}
|
||||||
|
|
||||||
if pm.lightSync {
|
if pm.lightSync {
|
||||||
go pm.syncer()
|
go pm.syncer()
|
||||||
} else {
|
} else {
|
||||||
pm.clientPool = newFreeClientPool(pm.chainDb, pm.maxFreePeers(0, 0), 10000, mclock.System{})
|
pm.clientPool = newFreeClientPool(pm.chainDb, freePeers, 10000, mclock.System{})
|
||||||
go func() {
|
go func() {
|
||||||
for range pm.newPeerCh {
|
for range pm.newPeerCh {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue