les: using random request IDs

This commit is contained in:
Zsolt Felfoldi
2016-12-06 06:16:53 +01:00
parent af8a742d00
commit c8130df1d9
3 changed files with 10 additions and 11 deletions

View File

@@ -350,7 +350,7 @@ func (f *lightFetcher) request(p *peer, n *fetcherTreeNode, amount uint64) (uint
return 0, false
}
reqID := f.odr.getNextReqID()
reqID := getNextReqID()
n.requested = true
cost := p.GetRequestCost(GetBlockHeadersMsg, int(amount))
p.fcServer.SendRequest(reqID, cost)