From 336a0f6ae1304cfa7f0cb0cd254ffd7597f5eb84 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Fri, 11 Sep 2020 14:08:06 -0400 Subject: [PATCH] minor --- lbry/service/api.py | 4 ++++ lbry/service/base.py | 6 ++++++ lbry/service/daemon.py | 5 ++++- lbry/service/light_client.py | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lbry/service/api.py b/lbry/service/api.py index 263768a60..ceee8ad5d 100644 --- a/lbry/service/api.py +++ b/lbry/service/api.py @@ -380,6 +380,10 @@ def support_filter_kwargs( class API: + """ + The high-level interface for the Service (either wallet server or client) + This is hte "public" api, for CLI and stuff. + """ def __init__(self, service: Service): self.service = service diff --git a/lbry/service/base.py b/lbry/service/base.py index cae882ccf..fc1d9e47f 100644 --- a/lbry/service/base.py +++ b/lbry/service/base.py @@ -19,6 +19,11 @@ class BlockEvent(NamedTuple): class Sync: + """ + Maintains local state in sync with some upstream source of truth. + Client stays synced with wallet server + Server stays synced with lbrycrd + """ def __init__(self, ledger: Ledger, db: Database): self.ledger = ledger @@ -50,6 +55,7 @@ class Sync: class Service: """ Base class for light client and full node LBRY service implementations. + This is the programmatic api (as compared to API) """ sync: Sync diff --git a/lbry/service/daemon.py b/lbry/service/daemon.py index a3b4e5a07..89463f9bc 100644 --- a/lbry/service/daemon.py +++ b/lbry/service/daemon.py @@ -68,7 +68,10 @@ class WebSocketManager(WebSocketResponse): class Daemon: - + """ + Mostly connects API to aiohttp stuff. + Handles starting and stopping API + """ def __init__(self, service: Service, console: Console): self.service = service self.conf = service.conf diff --git a/lbry/service/light_client.py b/lbry/service/light_client.py index ab4969720..48d14e9a7 100644 --- a/lbry/service/light_client.py +++ b/lbry/service/light_client.py @@ -12,6 +12,8 @@ log = logging.getLogger(__name__) class LightClient(Service): + sync: SPVSync + def __init__(self, ledger: Ledger): super().__init__(ledger) self.client = Client(Config().api_connection_url)