move lbry.wallet.server.udp -> lbry.wallet.udp

This commit is contained in:
Jack Robison 2022-03-05 16:40:32 -05:00
parent 8faaf9f465
commit f8bb89c8cd
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
5 changed files with 6 additions and 4 deletions

View file

@ -405,7 +405,7 @@ async def fallback_get_external_ip(): # used if spv servers can't be used for i
async def _get_external_ip(default_servers) -> typing.Tuple[typing.Optional[str], typing.Optional[str]]:
# used if upnp is disabled or non-functioning
from lbry.wallet.server.udp import SPVStatusClientProtocol # pylint: disable=C0415
from lbry.wallet.udp import SPVStatusClientProtocol # pylint: disable=C0415
hostname_to_ip = {}
ip_to_hostnames = collections.defaultdict(list)

View file

@ -16,7 +16,7 @@ from lbry.utils import resolve_host
from lbry.error import IncompatibleWalletServerError
from lbry.wallet.rpc import RPCSession as BaseClientSession, Connector, RPCError, ProtocolError
from lbry.wallet.stream import StreamController
from lbry.wallet.server.udp import SPVStatusClientProtocol, SPVPong
from lbry.wallet.udp import SPVStatusClientProtocol, SPVPong
from lbry.conf import KnownHubsList
log = logging.getLogger(__name__)

View file

@ -7,7 +7,7 @@ from prometheus_client import Gauge, Histogram
import lbry
from lbry.wallet.server.mempool import MemPool
from lbry.wallet.server.db.prefixes import DBState
from lbry.wallet.server.udp import StatusServer
from lbry.wallet.udp import StatusServer
from lbry.wallet.server.db.db import HubDB
from lbry.wallet.server.db.elasticsearch.notifier import ElasticNotifierClientProtocol
from lbry.wallet.server.session import LBRYSessionManager

View file

@ -175,9 +175,11 @@ class SPVServerStatusProtocol(asyncio.DatagramProtocol):
class StatusServer:
def __init__(self):
1/0
self._protocol: Optional[SPVServerStatusProtocol] = None
async def start(self, height: int, tip: bytes, country: str, interface: str, port: int, allow_lan: bool = False):
1/0
if self.is_running:
return
loop = asyncio.get_event_loop()

View file

@ -9,7 +9,7 @@ from lbry.wallet.network import Network
from lbry.wallet.orchstr8 import Conductor
from lbry.wallet.orchstr8.node import SPVNode
from lbry.wallet.rpc import RPCSession
from lbry.wallet.server.udp import StatusServer
from lbry.wallet.udp import StatusServer
from lbry.testcase import IntegrationTestCase, AsyncioTestCase
from lbry.conf import Config