diff --git a/lbrynet/core/HTTPBlobDownloader.py b/lbrynet/core/HTTPBlobDownloader.py index 0c36f232c..64bc67494 100644 --- a/lbrynet/core/HTTPBlobDownloader.py +++ b/lbrynet/core/HTTPBlobDownloader.py @@ -9,7 +9,7 @@ from lbrynet.core.Error import DownloadCanceledError log = logging.getLogger(__name__) -class HTTPBlobDownloader(object): +class HTTPBlobDownloader: ''' A downloader that is able to get blobs from HTTP mirrors. Note that when a blob gets downloaded from a mirror or from a peer, BlobManager will mark it as completed diff --git a/lbrynet/core/Wallet.py b/lbrynet/core/Wallet.py index 9a66ba115..5e08edb74 100644 --- a/lbrynet/core/Wallet.py +++ b/lbrynet/core/Wallet.py @@ -1,3 +1,4 @@ +# pylint: skip-file from collections import defaultdict, deque import datetime import logging @@ -8,13 +9,6 @@ from twisted.internet import threads, reactor, defer, task from twisted.python.failure import Failure from twisted.internet.error import ConnectionAborted -from lbryum import wallet as lbryum_wallet -from lbryum.network import Network -from lbryum.simple_config import SimpleConfig -from lbryum.constants import COIN -from lbryum.commands import Commands -from lbryum.errors import InvalidPassword - from lbryschema.uri import parse_lbry_uri from lbryschema.claim import ClaimDict from lbryschema.error import DecodeError diff --git a/lbrynet/daemon/Components.py b/lbrynet/daemon/Components.py index 9b22e0c6f..5bf7b316b 100644 --- a/lbrynet/daemon/Components.py +++ b/lbrynet/daemon/Components.py @@ -6,6 +6,7 @@ import binascii from hashlib import sha256 from types import SimpleNamespace from twisted.internet import defer, threads, reactor, error +import lbryschema from txupnp.upnp import UPnP from lbrynet import conf from lbrynet.core.utils import DeferredDict @@ -289,6 +290,7 @@ class HeadersComponent(Component): if not os.path.exists(self.headers_dir): os.mkdir(self.headers_dir) if os.path.exists(self.old_file): + log.warning("Moving old headers from %s to %s.", self.old_file, self.headers_file) os.rename(self.old_file, self.headers_file) self._downloading_headers = yield self.should_download_headers_from_s3() if self._downloading_headers: @@ -334,7 +336,7 @@ class WalletComponent(Component): log.info("Starting torba wallet") storage = self.component_manager.get_component(DATABASE_COMPONENT) lbryschema.BLOCKCHAIN_NAME = conf.settings['blockchain_name'] - self.wallet = LbryWalletManager.from_lbrynet_config(conf.settings) + self.wallet = LbryWalletManager.from_lbrynet_config(conf.settings, storage) self.wallet.old_db = storage yield self.wallet.start() diff --git a/lbrynet/daemon/auth/util.py b/lbrynet/daemon/auth/util.py index 29f1d5e09..9c860e479 100644 --- a/lbrynet/daemon/auth/util.py +++ b/lbrynet/daemon/auth/util.py @@ -17,7 +17,7 @@ def sha(x: bytes) -> bytes: return base58.b58encode(h) -def generate_key(x: bytes=None) -> bytes: +def generate_key(x: bytes = None) -> bytes: if x is None: return sha(os.urandom(256)) else: