PR feedback

- Use `Sequence` instead of `List`
- Add note
- Remove redundant words in docstring
This commit is contained in:
mhchia
2019-09-04 20:49:14 +08:00
parent db0da8083a
commit 0e3d4508d6
3 changed files with 7 additions and 6 deletions

View File

@ -116,9 +116,9 @@ class GossipSub(IPubsubRouter):
self.peers_floodsub.append(peer_id)
else:
# We should never enter here. Becuase the `protocol_id` is registered by your pubsub
# instance in multistream-select, but it is not the protocol that gossipsub supports,
# what we check above. In this case, probably we registered gossipsub to a wrong
# `protocol_id` in multistream-select, or wrong versions.
# 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.
# TODO: Better handling
raise Exception(f"protocol is not supported: protocol_id={protocol_id}")