diff --git a/lbry/lbry/conf.py b/lbry/lbry/conf.py index 4b07024ab..b186e54e6 100644 --- a/lbry/lbry/conf.py +++ b/lbry/lbry/conf.py @@ -22,9 +22,6 @@ CURRENCIES = { 'LBC': {'type': 'crypto'}, 'USD': {'type': 'fiat'}, } -HEADERS_FILE_SHA256_CHECKSUM = ( - 590383, '71ff515ab728467a35a1484ca8c29ad2bfae3ea77753f9d3dfc64743121e7129' -) class Setting(typing.Generic[T]): diff --git a/lbry/lbry/extras/daemon/ComponentManager.py b/lbry/lbry/extras/daemon/ComponentManager.py index c9e2fa336..c9069a8b5 100644 --- a/lbry/lbry/extras/daemon/ComponentManager.py +++ b/lbry/lbry/extras/daemon/ComponentManager.py @@ -165,4 +165,4 @@ class ComponentManager: raise NameError(component_name) def has_component(self, component_name): - return any(component.component_name == component_name for component in self.components) + return any(component for component in self.components if component_name == component.component_name) diff --git a/lbry/lbry/extras/daemon/Components.py b/lbry/lbry/extras/daemon/Components.py index b01e2f315..232a66481 100644 --- a/lbry/lbry/extras/daemon/Components.py +++ b/lbry/lbry/extras/daemon/Components.py @@ -119,7 +119,7 @@ class HeadersComponent(Component): def _round_progress(self, local_height, remote_height): return min(max(math.ceil(float(local_height) / float(remote_height) * 100), 0), 100) - async def get_status(self): + async def get_status(self) -> dict: progress = None if self.is_downloading_headers: progress = self._headers_progress_percent @@ -161,7 +161,7 @@ class HeadersComponent(Component): self.headers.bytes_size, final_size_after_download ) - def local_header_file_size(self): + def local_header_file_size(self) -> int: if os.path.isfile(self.headers_file): return os.stat(self.headers_file).st_size return 0 @@ -175,7 +175,7 @@ class HeadersComponent(Component): except OSError: log.exception("Failed to download headers using https.") - async def should_download_headers_from_s3(self): + async def should_download_headers_from_s3(self) -> bool: if self.conf.blockchain_name != "lbrycrd_main": return False s3_headers_depth = self.conf.s3_headers_depth