From 93f9c023ccda2256079484d6c2a3159818ba6691 Mon Sep 17 00:00:00 2001 From: Zsolt Felfoldi Date: Thu, 15 Dec 2016 11:13:52 +0100 Subject: les: fixed selectPeer deadlock, improved request distribution les/flowcontrol: using proper types for relative and absolute times --- les/peer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'les/peer.go') diff --git a/les/peer.go b/les/peer.go index 0a8db4975..770c9bf45 100644 --- a/les/peer.go +++ b/les/peer.go @@ -241,7 +241,9 @@ func (p *peer) RequestHeaderProofs(reqID, cost uint64, reqs []*ChtReq) error { func (p *peer) SendTxs(cost uint64, txs types.Transactions) error { glog.V(logger.Debug).Infof("%v relaying %v txs", p, len(txs)) - p.fcServer.SendRequest(0, cost) + reqID := getNextReqID() + p.fcServer.MustAssignRequest(reqID) + p.fcServer.SendRequest(reqID, cost) return p2p.Send(p.rw, SendTxMsg, txs) } -- cgit v1.2.3