aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-04-15 17:06:57 +0800
committerFelix Lange <fjl@twurst.com>2016-04-15 17:17:27 +0800
commit6fdd0893c3ebf57e5a9ba2af569c595c859ab902 (patch)
tree2df67265a0350b68b2f10ba2f7dcd292fef59ad0 /eth/downloader
parent68c755a238f1a204087c2843f01d48fc6039716f (diff)
downloadgo-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.gz
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.bz2
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.lz
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.xz
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.zst
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.zip
all: fix go vet warnings
Diffstat (limited to 'eth/downloader')
-rw-r--r--eth/downloader/downloader.go6
-rw-r--r--eth/downloader/queue.go2
2 files changed, 3 insertions, 5 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index f50a71cf1..801181712 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -892,8 +892,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error {
// case, the internal state of the downloader and the queue is very wrong so
// better hard crash and note the error instead of silently accumulating into
// a much bigger issue.
- panic(fmt.Sprintf("%v: fetch assignment failed, hard panic", peer))
- d.queue.CancelBlocks(request) // noop for now
+ panic(fmt.Sprintf("%v: fetch assignment failed", peer))
}
}
// Make sure that we have peers available for fetching. If all peers have been tried
@@ -1525,8 +1524,7 @@ func (d *Downloader) fetchParts(errCancel error, deliveryCh chan dataPack, deliv
// case, the internal state of the downloader and the queue is very wrong so
// better hard crash and note the error instead of silently accumulating into
// a much bigger issue.
- panic(fmt.Sprintf("%v: %s fetch assignment failed, hard panic", peer, strings.ToLower(kind)))
- cancel(request) // noop for now
+ panic(fmt.Sprintf("%v: %s fetch assignment failed", peer, strings.ToLower(kind)))
}
running = true
}
diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go
index f86bae144..d8d1bddce 100644
--- a/eth/downloader/queue.go
+++ b/eth/downloader/queue.go
@@ -983,7 +983,7 @@ func (q *queue) DeliverNodeData(id string, data [][]byte, callback func(error, i
continue
}
// Inject the next state trie item into the processing queue
- process = append(process, trie.SyncResult{hash, blob})
+ process = append(process, trie.SyncResult{Hash: hash, Data: blob})
accepted++
delete(request.Hashes, hash)