diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-08 02:07:20 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-05-08 02:07:20 +0800 |
commit | 9d188f73b58ee1fe4bda00a9536bda4056755f2c (patch) | |
tree | f9f9361b8440865a890df900ea7f7986ba169098 /eth/downloader/queue.go | |
parent | 43901c92825389b694fb5488c520cf5122f022de (diff) | |
download | dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.gz dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.bz2 dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.lz dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.xz dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.tar.zst dexon-9d188f73b58ee1fe4bda00a9536bda4056755f2c.zip |
eth, eth/downloader: make synchronize thread safe
Diffstat (limited to 'eth/downloader/queue.go')
-rw-r--r-- | eth/downloader/queue.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index d849d4d68..515440bca 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -63,16 +63,6 @@ func (q *queue) Reset() { q.blockCache = nil } -// Done checks if all the downloads have been retrieved, wiping the queue. -func (q *queue) Done() { - q.lock.Lock() - defer q.lock.Unlock() - - if len(q.blockCache) == 0 { - q.Reset() - } -} - // Size retrieves the number of hashes in the queue, returning separately for // pending and already downloaded. func (q *queue) Size() (int, int) { |