Apply suggestions from code review

Co-Authored-By: Chih Cheng Liang <chihchengliang@gmail.com>
This commit is contained in:
NIC Lin 2019-12-05 15:21:09 +08:00 committed by GitHub
parent 67f02c512a
commit b4900d53da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ class GossipSub(IPubsubRouter):
# In this case, probably we registered gossipsub to a wrong `protocol_id` # In this case, probably we registered gossipsub to a wrong `protocol_id`
# in multistream-select, or wrong versions. # in multistream-select, or wrong versions.
raise Exception( raise Exception(
f"This should not happen. Protocol={protocol_id} is not supported." f"Unreachable: Protocol={protocol_id} is not supported."
) )
self.peers_to_protocol[peer_id] = protocol_id self.peers_to_protocol[peer_id] = protocol_id

View File

@ -148,7 +148,7 @@ async def test_handle_prune(pubsubs_gsub, hosts):
await connect(hosts[index_alice], hosts[index_bob]) await connect(hosts[index_alice], hosts[index_bob])
# Wait 3 seconds for heartbeat to allow mesh to connect # Wait for heartbeat to allow mesh to connect
await asyncio.sleep(1) await asyncio.sleep(1)
# Check that they are each other's mesh peer # Check that they are each other's mesh peer