From 71a0c704bdf0503d6cd8e570c0d86dbfd775afb3 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 7 Jan 2019 17:42:50 -0500 Subject: [PATCH] storage.clock.seconds() -> asyncio.get_running_loop().time() --- lbrynet/p2p/BlobManager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lbrynet/p2p/BlobManager.py b/lbrynet/p2p/BlobManager.py index 227e3d60c..4e0e48ab0 100644 --- a/lbrynet/p2p/BlobManager.py +++ b/lbrynet/p2p/BlobManager.py @@ -1,3 +1,4 @@ +import asyncio import logging import os from binascii import unhexlify @@ -69,8 +70,9 @@ class DiskBlobManager: return f2d(self.storage.count_should_announce_blobs()) def set_should_announce(self, blob_hash, should_announce): - now = self.storage.clock.seconds() - return f2d(self.storage.set_should_announce(blob_hash, now, should_announce)) + return f2d(self.storage.set_should_announce( + blob_hash, asyncio.get_running_loop().time(), should_announce + )) def get_should_announce(self, blob_hash): return f2d(self.storage.should_announce(blob_hash))