type protocol IDs to satisfy mypy
This commit is contained in:
parent
e61a5a677f
commit
9a23609b48
|
@ -4,8 +4,9 @@ import logging
|
||||||
from libp2p.network.stream.exceptions import StreamEOF, StreamReset
|
from libp2p.network.stream.exceptions import StreamEOF, StreamReset
|
||||||
from libp2p.network.stream.net_stream_interface import INetStream
|
from libp2p.network.stream.net_stream_interface import INetStream
|
||||||
from libp2p.peer.id import ID as PeerID
|
from libp2p.peer.id import ID as PeerID
|
||||||
|
from libp2p.typing import TProtocol
|
||||||
|
|
||||||
ID = "/ipfs/ping/1.0.0"
|
ID = TProtocol("/ipfs/ping/1.0.0")
|
||||||
PING_LENGTH = 32
|
PING_LENGTH = 32
|
||||||
RESP_TIMEOUT = 60
|
RESP_TIMEOUT = 60
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,11 @@ from multiaddr import Multiaddr
|
||||||
|
|
||||||
from libp2p.host.host_interface import IHost
|
from libp2p.host.host_interface import IHost
|
||||||
from libp2p.network.stream.net_stream_interface import INetStream
|
from libp2p.network.stream.net_stream_interface import INetStream
|
||||||
from libp2p.typing import StreamHandlerFn
|
from libp2p.typing import StreamHandlerFn, TProtocol
|
||||||
|
|
||||||
from .pb.identify_pb2 import Identify
|
from .pb.identify_pb2 import Identify
|
||||||
|
|
||||||
ID = "/ipfs/id/1.0.0"
|
ID = TProtocol("/ipfs/id/1.0.0")
|
||||||
PROTOCOL_VERSION = "ipfs/0.1.0"
|
PROTOCOL_VERSION = "ipfs/0.1.0"
|
||||||
# TODO dynamically generate the agent version
|
# TODO dynamically generate the agent version
|
||||||
AGENT_VERSION = "py-libp2p/alpha"
|
AGENT_VERSION = "py-libp2p/alpha"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user