Commit Graph

11 Commits

Author SHA1 Message Date
4ad6401449
Logic error in download reset
- fix requesting the same object over and over again, now it continues to
  iterate through the other objects and only resets the queue after a timeout
  after the last received object
2019-01-02 22:25:25 +01:00
c3939875d3
Fix repeated downloads
- a bug in RandomTrackingDict caused requesting to download the same objects
  over and over
- the bug is that the lastObject wasn't properly initalised, this caused the
  write buffer to fill with "getdata" requests until the first object was
  received
- this PR should address both the excessive bandwidth as well as excessive CPU
  usage during downloading
2019-01-02 08:50:17 +01:00
coffeedogs
78ddb2f2f2
Changes based on style and lint checks. (final_code_quality_12) 2018-10-31 16:20:42 +00:00
12117ada99
Add docstring 2018-04-03 19:24:10 +02:00
ca7becb921
Download fixes
- in corner cases, download request could have contained an incorrect
  request length. I haven't actually checked if this can be triggered
  though
- wait for downloading until anti intersection delay expires. Doesn't
  necessarily mean that it will always avoid peer's anti intersection
  delay, but it's close enough
- tracks last time an object was received. If it was too long time ago,
  reset the download request queue. This avoid situations like when a
  request gets ignored during the anti intersection delay, but it will
  keep thinking there are still pending requests as long as not all
  missing objects have been requested. This caused staggered download
  (request 1000 items, wait 1 minute, request 1000 more, wait another
  minute, ...)
- with these fixes, you should end up downloading as fast as your
  network and CPU allow
- best tested with trustedpeer
2018-04-03 19:24:07 +02:00
Mahendra
1a36361ef9
replace all random.xxx with helper random function 2018-03-21 19:26:27 +05:30
053f434e04
Download fixes
- don't make empty requests
- don't make requests if all objects are pending already
2018-02-02 12:44:43 +01:00
dcce7ed4c5
Typo 2018-02-01 22:33:28 +01:00
451174b566
Download tracking fix
- don't reset tracking too early
- handle inserts when tracking objects
2018-02-01 22:31:45 +01:00
167d946435
RandomTrackingDict now tracks properly
- it didn't put the correct keys at the end
2018-02-01 14:43:14 +01:00
68b58ce0c5
Download optimisation
- new data structure to handle download tracking, uses less CPU
2018-02-01 12:19:39 +01:00