diff --git a/les/api.go b/les/api.go index 12b2553a3c..7da65b74d7 100644 --- a/les/api.go +++ b/les/api.go @@ -35,7 +35,7 @@ var ( errNotActivated = errors.New("checkpoint registrar is not activated") errUnknownBenchmarkType = errors.New("unknown benchmark type") errBalanceOverflow = errors.New("balance overflow") - errNoPriority = errors.New("not enough priority") + errNoPriority = errors.New("priority too low to raise capacity") ) const maxBalance = math.MaxInt64 diff --git a/les/clientpool.go b/les/clientpool.go index 6e61250cf9..96a7b90332 100644 --- a/les/clientpool.go +++ b/les/clientpool.go @@ -446,6 +446,7 @@ func (f *clientPool) balanceExhausted(id enode.ID) { f.connectedCap += f.freeClientCap - c.capacity totalConnectedGauge.Update(int64(f.connectedCap)) c.capacity = f.freeClientCap + c.balanceTracker.setCapacity(c.capacity) c.peer.updateCapacity(c.capacity) } pb := f.ndb.getOrNewPB(id)