run black w/ extended line length

This commit is contained in:
Alex Stokes
2019-08-03 11:25:25 -07:00
committed by Kevin Mai-Husan Chia
parent 905dfa9a8d
commit 7477b29508
33 changed files with 71 additions and 229 deletions

View File

@ -50,9 +50,7 @@ class KademliaProtocol(RPCProtocol):
source = create_kad_peerinfo(nodeid, sender[0], sender[1])
self.welcome_if_new(source)
log.debug(
"got a store request from %s, storing '%s'='%s'", sender, key.hex(), value
)
log.debug("got a store request from %s, storing '%s'='%s'", sender, key.hex(), value)
self.storage[key] = value
return True
@ -82,9 +80,7 @@ class KademliaProtocol(RPCProtocol):
we store a map of content_id to peer_id (non xor)
"""
if nodeid == provider_id:
log.info(
"adding provider %s for key %s in local table", provider_id, str(key)
)
log.info("adding provider %s for key %s in local table", provider_id, str(key))
self.storage[key] = provider_id
return True
return False
@ -135,9 +131,7 @@ class KademliaProtocol(RPCProtocol):
async def call_add_provider(self, node_to_ask, key, provider_id):
address = (node_to_ask.ip, node_to_ask.port)
result = await self.add_provider(
address, self.source_node.peer_id_bytes, key, provider_id
)
result = await self.add_provider(address, self.source_node.peer_id_bytes, key, provider_id)
return self.handle_call_response(result, node_to_ask)