mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
Merge 43064d8ddd into 80f7c6c299
This commit is contained in:
commit
9a730002ac
1 changed files with 5 additions and 1 deletions
|
|
@ -81,10 +81,14 @@ func NewClientManager(rcTarget, maxSimReq, maxRcSum uint64) *ClientManager {
|
|||
cm := &ClientManager{
|
||||
nodes: make(map[*cmNode]struct{}),
|
||||
resumeQueue: make(chan chan bool),
|
||||
rcRecharge: rcConst * rcConst / (100*rcConst/rcTarget - rcConst),
|
||||
rcRecharge: rcConst * rcConst,
|
||||
maxSimReq: maxSimReq,
|
||||
maxRcSum: maxRcSum,
|
||||
}
|
||||
if rcTarget < 100 {
|
||||
cm.rcRecharge /= (100*rcConst/rcTarget - rcConst)
|
||||
}
|
||||
|
||||
go cm.queueProc()
|
||||
return cm
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue