Improve naming.

This commit is contained in:
Richard Kiss 2017-05-13 22:55:49 -07:00
parent eb8a2c72e6
commit 2f68ac3c7a
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ InfoHash = bytes
PeerAddress = typing.Tuple[str, int]
async def get_torrent_data(info_hash: InfoHash, peer_addr: PeerAddress, max_metadata_size):
async def fetch_metadata(info_hash: InfoHash, peer_addr: PeerAddress, max_metadata_size):
loop = asyncio.get_event_loop()
peer = DisposablePeer(info_hash, peer_addr, max_metadata_size)
r = await peer.launch(loop)

View File

@ -182,7 +182,7 @@ class SybilNode:
info_hash in self._complete_info_hashes:
return
peer = bittorrent.get_torrent_data(info_hash, peer_addr, self.__max_metadata_size)
peer = bittorrent.fetch_metadata(info_hash, peer_addr, self.__max_metadata_size)
self.__peers[info_hash].append(peer)
self._loop.create_task(peer).add_done_callback(self.metadata_found)