func (f *blockFetcher) blockProcessor() {
for {
- height := f.chain.BestBlockHeight()
for !f.queue.Empty() {
msg := f.queue.PopItem().(*blockMsg)
- if msg.block.Height > height+1 {
+ if msg.block.Height > f.chain.BestBlockHeight()+1 {
f.queue.Push(msg, -float32(msg.block.Height))
break
}