From a448dbda8d7fcb44de13d50cc8df7596f1bebf6d Mon Sep 17 00:00:00 2001 From: fusion44 Date: Sun, 9 Oct 2022 20:16:49 +0200 Subject: [PATCH] fix: more import path fixes --- app/lightning/impl/lnd_grpc.py | 18 +++++++++--------- .../impl/protos/lnd/lightning_pb2_grpc.py | 2 +- app/lightning/impl/protos/lnd/router_pb2.py | 2 +- .../impl/protos/lnd/router_pb2_grpc.py | 4 ++-- .../impl/protos/lnd/walletunlocker_pb2.py | 2 +- .../impl/protos/lnd/walletunlocker_pb2_grpc.py | 2 +- .../impl/specializations/cln_grpc_blitz.py | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/lightning/impl/lnd_grpc.py b/app/lightning/impl/lnd_grpc.py index 8610b68..759d074 100644 --- a/app/lightning/impl/lnd_grpc.py +++ b/app/lightning/impl/lnd_grpc.py @@ -8,14 +8,15 @@ from decouple import config as dconfig from fastapi.exceptions import HTTPException from starlette import status -import app.repositories.ln_impl.protos.lnd.lightning_pb2 as ln -import app.repositories.ln_impl.protos.lnd.lightning_pb2_grpc as lnrpc -import app.repositories.ln_impl.protos.lnd.router_pb2 as router -import app.repositories.ln_impl.protos.lnd.router_pb2_grpc as routerrpc -import app.repositories.ln_impl.protos.lnd.walletunlocker_pb2 as unlocker -import app.repositories.ln_impl.protos.lnd.walletunlocker_pb2_grpc as unlockerrpc +import app.lightning.impl.protos.lnd.lightning_pb2 as ln +import app.lightning.impl.protos.lnd.lightning_pb2_grpc as lnrpc +import app.lightning.impl.protos.lnd.router_pb2 as router +import app.lightning.impl.protos.lnd.router_pb2_grpc as routerrpc +import app.lightning.impl.protos.lnd.walletunlocker_pb2 as unlocker +import app.lightning.impl.protos.lnd.walletunlocker_pb2_grpc as unlockerrpc from app.api.utils import SSE, broadcast_sse_msg, config_get_hex_str -from app.models.lightning import ( +from app.lightning.impl.ln_base import LightningNodeBase +from app.lightning.models import ( Channel, FeeRevenue, ForwardSuccessEvent, @@ -34,7 +35,6 @@ from app.models.lightning import ( SendCoinsResponse, WalletBalance, ) -from app.lightning.impl.ln_base import LightningNodeBase def _check_if_locked(error): @@ -67,7 +67,7 @@ LND_GRPC: Unable to connect to LND. Possible reasons: This will recreate the TLS certificate. The .env must be adapted accordingly. * TLS certificate is wrong. (settings changed, ...) -To Debug gRPC problems uncomment the following line in app.repositories.ln_impl.lnd_grpc.py +To Debug gRPC problems uncomment the following line in app.lightning.impl.lnd_grpc.py # os.environ["GRPC_VERBOSITY"] = "DEBUG" This will show more debug information. """ diff --git a/app/lightning/impl/protos/lnd/lightning_pb2_grpc.py b/app/lightning/impl/protos/lnd/lightning_pb2_grpc.py index d4f554e..a88fe85 100644 --- a/app/lightning/impl/protos/lnd/lightning_pb2_grpc.py +++ b/app/lightning/impl/protos/lnd/lightning_pb2_grpc.py @@ -2,7 +2,7 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -import app.repositories.ln_impl.protos.lnd.lightning_pb2 as lightning__pb2 +import app.lightning.impl.protos.lnd.lightning_pb2 as lightning__pb2 class LightningStub(object): diff --git a/app/lightning/impl/protos/lnd/router_pb2.py b/app/lightning/impl/protos/lnd/router_pb2.py index 5502c3d..b9f4ef2 100644 --- a/app/lightning/impl/protos/lnd/router_pb2.py +++ b/app/lightning/impl/protos/lnd/router_pb2.py @@ -8,7 +8,7 @@ from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import enum_type_wrapper -import app.repositories.ln_impl.protos.lnd.lightning_pb2 as lightning__pb2 +import app.lightning.impl.protos.lnd.lightning_pb2 as lightning__pb2 # @@protoc_insertion_point(imports) diff --git a/app/lightning/impl/protos/lnd/router_pb2_grpc.py b/app/lightning/impl/protos/lnd/router_pb2_grpc.py index 3a1beb0..6431d87 100644 --- a/app/lightning/impl/protos/lnd/router_pb2_grpc.py +++ b/app/lightning/impl/protos/lnd/router_pb2_grpc.py @@ -2,8 +2,8 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -import app.repositories.ln_impl.protos.lnd.lightning_pb2 as lightning__pb2 -import app.repositories.ln_impl.protos.lnd.router_pb2 as router__pb2 +import app.lightning.impl.protos.lnd.lightning_pb2 as lightning__pb2 +import app.lightning.impl.protos.lnd.router_pb2 as router__pb2 class RouterStub(object): diff --git a/app/lightning/impl/protos/lnd/walletunlocker_pb2.py b/app/lightning/impl/protos/lnd/walletunlocker_pb2.py index 258783c..376629a 100644 --- a/app/lightning/impl/protos/lnd/walletunlocker_pb2.py +++ b/app/lightning/impl/protos/lnd/walletunlocker_pb2.py @@ -12,7 +12,7 @@ from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() -import app.repositories.ln_impl.protos.lnd.lightning_pb2 as lightning__pb2 +import app.lightning.impl.protos.lnd.lightning_pb2 as lightning__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="walletunlocker.proto", diff --git a/app/lightning/impl/protos/lnd/walletunlocker_pb2_grpc.py b/app/lightning/impl/protos/lnd/walletunlocker_pb2_grpc.py index e7f9909..b320071 100644 --- a/app/lightning/impl/protos/lnd/walletunlocker_pb2_grpc.py +++ b/app/lightning/impl/protos/lnd/walletunlocker_pb2_grpc.py @@ -2,7 +2,7 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -import app.repositories.ln_impl.protos.lnd.walletunlocker_pb2 as walletunlocker__pb2 +import app.lightning.impl.protos.lnd.walletunlocker_pb2 as walletunlocker__pb2 class WalletUnlockerStub(object): diff --git a/app/lightning/impl/specializations/cln_grpc_blitz.py b/app/lightning/impl/specializations/cln_grpc_blitz.py index f0f7eb3..7742f9e 100644 --- a/app/lightning/impl/specializations/cln_grpc_blitz.py +++ b/app/lightning/impl/specializations/cln_grpc_blitz.py @@ -7,7 +7,8 @@ from fastapi.exceptions import HTTPException from starlette import status from app.api.utils import call_script2, redis_get -from app.models.lightning import ( +from app.lightning.impl.cln_grpc import LnNodeCLNgRPC +from app.lightning.models import ( Channel, FeeRevenue, ForwardSuccessEvent, @@ -24,7 +25,6 @@ from app.models.lightning import ( SendCoinsResponse, WalletBalance, ) -from app.lightning.impl.cln_grpc import LnNodeCLNgRPC class LnNodeCLNgRPCBlitz(LnNodeCLNgRPC):