les, tests: fix les clientpool (#22756)
* les, tests: fix les clientpool * tests: disable debug mode * les: polish code
This commit is contained in:
@ -239,12 +239,11 @@ func (cp *ClientPool) SetCapacity(node *enode.Node, reqCap uint64, bias time.Dur
|
||||
maxTarget = curve.maxCapacity(func(capacity uint64) int64 {
|
||||
return balance.estimatePriority(capacity, 0, 0, bias, false)
|
||||
})
|
||||
if maxTarget <= capacity {
|
||||
if maxTarget < reqCap {
|
||||
return
|
||||
}
|
||||
if maxTarget > reqCap {
|
||||
maxTarget = reqCap
|
||||
}
|
||||
maxTarget = reqCap
|
||||
|
||||
// Specify a narrow target range that allows a limited number of fine step
|
||||
// iterations
|
||||
minTarget = maxTarget - maxTarget/20
|
||||
|
Reference in New Issue
Block a user