Rev957, Sidebar displays onion peers in graph, Sidebar display bad file retry number, Sidebar site Update/Pause/Delete, Ratelimit sidebar update, Encoded typo, Fix onion findHashId, More retry for bad files, Log file path errors, Testcase for self findhashIds, Testcase for Tor findHashId, Better Tor version parse, UiWebsocket callback on update/pause/resume/delete, Skip invalid postMessage messages
This commit is contained in:
parent
ea3257dc09
commit
e891a10e54
18 changed files with 204 additions and 36 deletions
|
@ -274,7 +274,15 @@ class Peer(object):
|
|||
res = self.request("findHashIds", {"site": self.site.address, "hash_ids": hash_ids})
|
||||
if not res or "error" in res:
|
||||
return False
|
||||
return {key: map(helper.unpackAddress, val) for key, val in res["peers"].iteritems()}
|
||||
# Unpack IP4
|
||||
back = {key: map(helper.unpackAddress, val) for key, val in res["peers"].iteritems()}
|
||||
# Unpack onion
|
||||
for hash, onion_peers in res.get("peers_onion", {}).iteritems():
|
||||
if not hash in back:
|
||||
back[hash] = []
|
||||
back[hash] += map(helper.unpackOnionAddress, onion_peers)
|
||||
|
||||
return back
|
||||
|
||||
# Send my hashfield to peer
|
||||
# Return: True if sent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue