diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-02-09 18:14:48 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-02-09 18:14:48 +0800 |
commit | 8b5b635db7437b87259e10c442f6020443c07f47 (patch) | |
tree | 2ff25b7bd69b8775dee2b84f44106e2a9f3f0b7e /eth/downloader/queue.go | |
parent | 856b9e9c500dae60ed84e75d9577b2deb504558e (diff) | |
parent | f1ec226d8069fcc4f79cbcec2bf0d1bb4795beb3 (diff) | |
download | dexon-8b5b635db7437b87259e10c442f6020443c07f47.tar dexon-8b5b635db7437b87259e10c442f6020443c07f47.tar.gz dexon-8b5b635db7437b87259e10c442f6020443c07f47.tar.bz2 dexon-8b5b635db7437b87259e10c442f6020443c07f47.tar.lz dexon-8b5b635db7437b87259e10c442f6020443c07f47.tar.xz dexon-8b5b635db7437b87259e10c442f6020443c07f47.tar.zst dexon-8b5b635db7437b87259e10c442f6020443c07f47.zip |
Merge pull request #2184 from karalabe/fix-fastsync-state-serializer-bug
eth/downloader: raise pending state limit that prevented concurrency
Diffstat (limited to 'eth/downloader/queue.go')
-rw-r--r-- | eth/downloader/queue.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 1e55560db..9d0f2914d 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -39,7 +39,8 @@ import ( ) var ( - blockCacheLimit = 1024 // Maximum number of blocks to cache before throttling the download + blockCacheLimit = 1024 // Maximum number of blocks to cache before throttling the download + maxInFlightStates = 4096 // Maximum number of state downloads to allow concurrently ) var ( @@ -464,7 +465,7 @@ func (q *queue) ReserveNodeData(p *peer, count int) *fetchRequest { q.lock.Lock() defer q.lock.Unlock() - return q.reserveHashes(p, count, q.stateTaskQueue, generator, q.statePendPool, count) + return q.reserveHashes(p, count, q.stateTaskQueue, generator, q.statePendPool, maxInFlightStates) } // reserveHashes reserves a set of hashes for the given peer, skipping previously |