[ethereum/go-ethereum] les: implement ulc (#16904)

zsfelfoldi commented on this pull request.

> }
— } else {
— rq = &distReq{
— getCost: func(dp distPeer) uint64 {
— p := dp.(*peer)
— return p.GetRequestCost(GetBlockHeadersMsg, int(bestAmount))
— },
— canSend: func(dp distPeer) bool {
+ if _, ok := fp.nodeByHash[hash]; !ok {
+ continue
+ }
+
+ numAgreed = numAgreed + 1

numAgreed++ is cleaner

Добавить комментарий