diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-10-09 23:36:31 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-10-19 15:03:10 +0800 |
commit | aa0538db0b5de2bb2c609d629b65d083649f9171 (patch) | |
tree | a1ce77d4fa8d041a78975b6f99067e85eb725ea1 /eth/downloader/queue.go | |
parent | a9d8dfc8e77330412b1f21e25a69b96d59567e36 (diff) | |
download | go-tangerine-aa0538db0b5de2bb2c609d629b65d083649f9171.tar.gz go-tangerine-aa0538db0b5de2bb2c609d629b65d083649f9171.tar.zst go-tangerine-aa0538db0b5de2bb2c609d629b65d083649f9171.zip |
eth: clean out light node notions from eth
Diffstat (limited to 'eth/downloader/queue.go')
-rw-r--r-- | eth/downloader/queue.go | 10 |
1 files changed, 6 insertions, 4 deletions
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) |