mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
INetworkService implement ServiceAPI
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import TYPE_CHECKING, Dict, Sequence
|
||||
|
||||
from async_service import Service
|
||||
from async_service import ServiceAPI
|
||||
from multiaddr import Multiaddr
|
||||
|
||||
from libp2p.network.connection.net_connection_interface import INetConn
|
||||
@ -73,5 +73,5 @@ class INetwork(ABC):
|
||||
pass
|
||||
|
||||
|
||||
class INetworkService(INetwork, Service):
|
||||
class INetworkService(INetwork, ServiceAPI):
|
||||
...
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import logging
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
from async_service import Service
|
||||
from multiaddr import Multiaddr
|
||||
|
||||
from libp2p.io.abc import ReadWriteCloser
|
||||
@ -30,7 +31,7 @@ from .stream.net_stream_interface import INetStream
|
||||
logger = logging.getLogger("libp2p.network.swarm")
|
||||
|
||||
|
||||
class Swarm(INetworkService):
|
||||
class Swarm(Service, INetworkService):
|
||||
|
||||
self_id: ID
|
||||
peerstore: IPeerStore
|
||||
|
||||
Reference in New Issue
Block a user