Start downloading earlier

This commit is contained in:
Peter Šurda 2018-01-02 22:20:33 +01:00
parent 4086253730
commit f74f82e54f
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -29,6 +29,7 @@ class ObjectTracker(object):
invInitialCapacity = 50000
invErrorRate = 0.03
trackingExpires = 3600
initialTimeOffset = 60
def __init__(self):
self.objectsNewToMe = {}
@ -87,7 +88,7 @@ class ObjectTracker(object):
if hashId in Dandelion().hashMap:
Dandelion().fluffTrigger(hashId)
if hashId not in missingObjects:
missingObjects[hashId] = time.time()
missingObjects[hashId] = time.time() - ObjectTracker.initialTimeOffset
with self.objectsNewToMeLock:
self.objectsNewToMe[hashId] = True