Unverified Commit 2003b797 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub

Merge pull request #16095 from karalabe/les-lock

les: add missing lock around peer access
parents e2f2bb3e dfc5842a
......@@ -425,6 +425,9 @@ func (f *lightFetcher) nextRequest() (*distReq, uint64) {
},
canSend: func(dp distPeer) bool {
p := dp.(*peer)
f.lock.Lock()
defer f.lock.Unlock()
fp := f.peers[p]
return fp != nil && fp.nodeByHash[bestHash] != nil
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment