les: remove clientPeerSet and serverSet (#21566)
* les: move NodeStateMachine from clientPool to LesServer * les: new header broadcaster * les: peerCommons.headInfo always contains last announced head * les: remove clientPeerSet and serverSet * les: fixed panic * les: fixed --nodiscover option * les: disconnect all peers at ns.Stop() * les: added comments and fixed signed broadcasts * les: removed unused parameter, fixed tests
This commit is contained in:
@@ -253,12 +253,12 @@ func (pp *PriorityPool) SetActiveBias(bias time.Duration) {
|
||||
pp.tryActivate()
|
||||
}
|
||||
|
||||
// ActiveCapacity returns the total capacity of currently active nodes
|
||||
func (pp *PriorityPool) ActiveCapacity() uint64 {
|
||||
// Active returns the number and total capacity of currently active nodes
|
||||
func (pp *PriorityPool) Active() (uint64, uint64) {
|
||||
pp.lock.Lock()
|
||||
defer pp.lock.Unlock()
|
||||
|
||||
return pp.activeCap
|
||||
return pp.activeCount, pp.activeCap
|
||||
}
|
||||
|
||||
// inactiveSetIndex callback updates ppNodeInfo item index in inactiveQueue
|
||||
|
Reference in New Issue
Block a user