From c654bfe296cd17c757c7249149599b2b2bf4d76a Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Wed, 23 May 2018 17:45:24 -0400 Subject: [PATCH] use reactor clock in TreeRoutingTable instead of time module --- lbrynet/dht/routingtable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/dht/routingtable.py b/lbrynet/dht/routingtable.py index 0b20fa621..9e0d0cb49 100644 --- a/lbrynet/dht/routingtable.py +++ b/lbrynet/dht/routingtable.py @@ -43,7 +43,8 @@ class TreeRoutingTable(object): self._parentNodeID = parentNodeID self._buckets = [kbucket.KBucket(rangeMin=0, rangeMax=2 ** constants.key_bits, node_id=self._parentNodeID)] if not getTime: - from time import time as getTime + from twisted.internet import reactor + getTime = reactor.seconds self._getTime = getTime def addContact(self, contact):