diff options
author | Zsolt Felfoldi <zsfelfoldi@gmail.com> | 2016-12-06 13:16:53 +0800 |
---|---|---|
committer | Zsolt Felfoldi <zsfelfoldi@gmail.com> | 2016-12-10 16:53:25 +0800 |
commit | c8130df1d9dcc504244a49cbb12aa4c2848e5de2 (patch) | |
tree | 172e9af96668feb822d67fedc28771d7671c9e7d /les/handler.go | |
parent | af8a742d00f9d47b832f6f2d50a8e1c89bbf8441 (diff) | |
download | dexon-c8130df1d9dcc504244a49cbb12aa4c2848e5de2.tar.gz dexon-c8130df1d9dcc504244a49cbb12aa4c2848e5de2.tar.zst dexon-c8130df1d9dcc504244a49cbb12aa4c2848e5de2.zip |
les: using random request IDs
Diffstat (limited to 'les/handler.go')
-rw-r--r-- | les/handler.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/les/handler.go b/les/handler.go index 4535aaeb9..3fc80e19a 100644 --- a/les/handler.go +++ b/les/handler.go @@ -338,13 +338,13 @@ func (pm *ProtocolManager) handle(p *peer) error { glog.V(logger.Debug).Infof("LES: register peer %v", p.id) if pm.lightSync { requestHeadersByHash := func(origin common.Hash, amount int, skip int, reverse bool) error { - reqID := pm.odr.getNextReqID() + reqID := getNextReqID() cost := p.GetRequestCost(GetBlockHeadersMsg, amount) p.fcServer.SendRequest(reqID, cost) return p.RequestHeadersByHash(reqID, cost, origin, amount, skip, reverse) } requestHeadersByNumber := func(origin uint64, amount int, skip int, reverse bool) error { - reqID := pm.odr.getNextReqID() + reqID := getNextReqID() cost := p.GetRequestCost(GetBlockHeadersMsg, amount) p.fcServer.SendRequest(reqID, cost) return p.RequestHeadersByNumber(reqID, cost, origin, amount, skip, reverse) |