Update libp2p/pubsub/gossipsub.py

Co-Authored-By: Chih Cheng Liang <chihchengliang@gmail.com>
This commit is contained in:
NIC Lin 2019-12-19 16:33:56 +08:00 committed by GitHub
parent 74092c1371
commit cb80cfc50b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,7 +121,7 @@ class GossipSub(IPubsubRouter):
# instance in multistream-select, but it is not the protocol that gossipsub supports.
# In this case, probably we registered gossipsub to a wrong `protocol_id`
# in multistream-select, or wrong versions.
raise Exception(f"Unreachable: Protocol={protocol_id} is not supported.")
raise ValueError(f"Protocol={protocol_id} is not supported.")
self.peer_protocol[peer_id] = protocol_id
def remove_peer(self, peer_id: ID) -> None: