Move HandshakeFailure to libp2p.security

This commit is contained in:
NIC619 2019-09-16 19:09:09 +08:00
parent 4cd5b77f10
commit d6dda91482
No known key found for this signature in database
GPG Key ID: 570C35F5C2D51B17
3 changed files with 6 additions and 5 deletions

View File

@ -0,0 +1,5 @@
from libp2p.exceptions import BaseLibp2pError
class HandshakeFailure(BaseLibp2pError):
pass

View File

@ -12,7 +12,3 @@ class SecurityUpgradeFailure(UpgradeFailure):
class MuxerUpgradeFailure(UpgradeFailure): class MuxerUpgradeFailure(UpgradeFailure):
pass pass
class HandshakeFailure(BaseLibp2pError):
pass

View File

@ -4,13 +4,13 @@ from libp2p.network.connection.raw_connection_interface import IRawConnection
from libp2p.network.typing import GenericProtocolHandlerFn from libp2p.network.typing import GenericProtocolHandlerFn
from libp2p.peer.id import ID from libp2p.peer.id import ID
from libp2p.protocol_muxer.exceptions import MultiselectClientError, MultiselectError from libp2p.protocol_muxer.exceptions import MultiselectClientError, MultiselectError
from libp2p.security.exceptions import HandshakeFailure
from libp2p.security.secure_conn_interface import ISecureConn from libp2p.security.secure_conn_interface import ISecureConn
from libp2p.security.secure_transport_interface import ISecureTransport from libp2p.security.secure_transport_interface import ISecureTransport
from libp2p.security.security_multistream import SecurityMultistream from libp2p.security.security_multistream import SecurityMultistream
from libp2p.stream_muxer.abc import IMuxedConn from libp2p.stream_muxer.abc import IMuxedConn
from libp2p.stream_muxer.muxer_multistream import MuxerClassType, MuxerMultistream from libp2p.stream_muxer.muxer_multistream import MuxerClassType, MuxerMultistream
from libp2p.transport.exceptions import ( from libp2p.transport.exceptions import (
HandshakeFailure,
MuxerUpgradeFailure, MuxerUpgradeFailure,
SecurityUpgradeFailure, SecurityUpgradeFailure,
) )