From aa0538db0b5de2bb2c609d629b65d083649f9171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 9 Oct 2015 18:36:31 +0300 Subject: eth: clean out light node notions from eth --- eth/downloader/queue.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'eth/downloader') diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index bb8d892cd..17fbb1c7f 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -422,10 +422,12 @@ func (q *queue) ReserveNodeData(p *peer, count int) *fetchRequest { q.stateSchedLock.Lock() defer q.stateSchedLock.Unlock() - for _, hash := range q.stateScheduler.Missing(max) { - q.stateTaskPool[hash] = q.stateTaskIndex - q.stateTaskQueue.Push(hash, -float32(q.stateTaskIndex)) - q.stateTaskIndex++ + if q.stateScheduler != nil { + for _, hash := range q.stateScheduler.Missing(max) { + q.stateTaskPool[hash] = q.stateTaskIndex + q.stateTaskQueue.Push(hash, -float32(q.stateTaskIndex)) + q.stateTaskIndex++ + } } } return q.reserveHashes(p, count, q.stateTaskQueue, generator, q.statePendPool, count) -- cgit v1.2.3