diff options
author | Felix Lange <fjl@twurst.com> | 2016-04-15 19:45:15 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-04-15 19:45:15 +0800 |
commit | 6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea (patch) | |
tree | 1b3b3677892e2d94400f3604dc6c2dda4c05ccd4 /eth/downloader | |
parent | 5c17b2f5211ec98a87140c874483681de4e34391 (diff) | |
parent | bf5ae502ef179490a039c9bcd66d32cd5a7ce5e9 (diff) | |
download | go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.gz go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.bz2 go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.lz go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.xz go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.zst go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.zip |
Merge pull request #2458 from fjl/go-vet
all: fix go vet warnings
Diffstat (limited to 'eth/downloader')
-rw-r--r-- | eth/downloader/downloader.go | 6 | ||||
-rw-r--r-- | eth/downloader/queue.go | 2 |
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) |