eth: clean out light node notions from eth

This commit is contained in:
Péter Szilágyi
2015-10-09 18:36:31 +03:00
parent a9d8dfc8e7
commit aa0538db0b
9 changed files with 39 additions and 106 deletions

View File

@ -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)