Преглед на файлове

eth/downloader: fix nil panic caused by wrong variable use

Péter Szilágyi преди 10 години
родител
ревизия
910a6d4e46
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      eth/downloader/downloader.go

+ 1 - 1
eth/downloader/downloader.go

@@ -289,7 +289,7 @@ out:
 			// already fetched hash list. This can't guarantee 100% correctness but does
 			// a fair job. This is always either correct or false incorrect.
 			for _, peer := range d.peers.AllPeers() {
-				if d.queue.Has(peer.head) && !attemptedPeers[p.id] {
+				if d.queue.Has(peer.head) && !attemptedPeers[peer.id] {
 					p = peer
 					break
 				}