les: fix and slim the unit tests of les (#20247)
* les: loose restriction of unit tests * les: update unit tests * les, light: slim the unit tests
This commit is contained in:
committed by
Felföldi Zsolt
parent
fc3661f89c
commit
b9bac1f384
@ -459,6 +459,9 @@ func (f *clientPool) addBalance(id enode.ID, amount uint64, setTotal bool) {
|
||||
defer func() {
|
||||
c.balanceTracker.setBalance(pb.value, negBalance)
|
||||
if !c.priority && pb.value > 0 {
|
||||
// The capacity should be adjusted based on the requirement,
|
||||
// but we have no idea about the new capacity, need a second
|
||||
// call to udpate it.
|
||||
c.priority = true
|
||||
c.balanceTracker.addCallback(balanceCallbackZero, 0, func() { f.balanceExhausted(id) })
|
||||
}
|
||||
|
Reference in New Issue
Block a user