INetworkService
implement ServiceAPI
This commit is contained in:
parent
ddfbf9ffc8
commit
42bc4d5d06
|
@ -1,7 +1,7 @@
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from typing import TYPE_CHECKING, Dict, Sequence
|
from typing import TYPE_CHECKING, Dict, Sequence
|
||||||
|
|
||||||
from async_service import Service
|
from async_service import ServiceAPI
|
||||||
from multiaddr import Multiaddr
|
from multiaddr import Multiaddr
|
||||||
|
|
||||||
from libp2p.network.connection.net_connection_interface import INetConn
|
from libp2p.network.connection.net_connection_interface import INetConn
|
||||||
|
@ -73,5 +73,5 @@ class INetwork(ABC):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class INetworkService(INetwork, Service):
|
class INetworkService(INetwork, ServiceAPI):
|
||||||
...
|
...
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import logging
|
import logging
|
||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional
|
||||||
|
|
||||||
|
from async_service import Service
|
||||||
from multiaddr import Multiaddr
|
from multiaddr import Multiaddr
|
||||||
|
|
||||||
from libp2p.io.abc import ReadWriteCloser
|
from libp2p.io.abc import ReadWriteCloser
|
||||||
|
@ -30,7 +31,7 @@ from .stream.net_stream_interface import INetStream
|
||||||
logger = logging.getLogger("libp2p.network.swarm")
|
logger = logging.getLogger("libp2p.network.swarm")
|
||||||
|
|
||||||
|
|
||||||
class Swarm(INetworkService):
|
class Swarm(Service, INetworkService):
|
||||||
|
|
||||||
self_id: ID
|
self_id: ID
|
||||||
peerstore: IPeerStore
|
peerstore: IPeerStore
|
||||||
|
|
Loading…
Reference in New Issue
Block a user