forked from LBRYCommunity/lbry-sdk
add port to routing_table_get
This commit is contained in:
parent
cc32d987b2
commit
bdd6f948ca
1 changed files with 3 additions and 1 deletions
|
@ -3137,6 +3137,7 @@ class Daemon(AuthJSONRPCServer):
|
|||
<bucket index>: [
|
||||
{
|
||||
"address": (str) peer address,
|
||||
"port": (int) peer udp port
|
||||
"node_id": (str) peer node id,
|
||||
"blobs": (list) blob hashes announced by peer
|
||||
}
|
||||
|
@ -3159,7 +3160,7 @@ class Daemon(AuthJSONRPCServer):
|
|||
try:
|
||||
contact = self.session.dht_node._routingTable.getContact(
|
||||
originalPublisherID)
|
||||
except ValueError:
|
||||
except (ValueError, IndexError):
|
||||
continue
|
||||
if contact in hosts:
|
||||
blobs = hosts[contact]
|
||||
|
@ -3182,6 +3183,7 @@ class Daemon(AuthJSONRPCServer):
|
|||
blobs = []
|
||||
host = {
|
||||
"address": contact.address,
|
||||
"port": contact.port,
|
||||
"node_id": contact.id.encode("hex"),
|
||||
"blobs": blobs,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue