mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
les: changed error message, added balance tracker update
This commit is contained in:
parent
6614683246
commit
5a8320b1eb
2 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue