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>: [
|
<bucket index>: [
|
||||||
{
|
{
|
||||||
"address": (str) peer address,
|
"address": (str) peer address,
|
||||||
|
"port": (int) peer udp port
|
||||||
"node_id": (str) peer node id,
|
"node_id": (str) peer node id,
|
||||||
"blobs": (list) blob hashes announced by peer
|
"blobs": (list) blob hashes announced by peer
|
||||||
}
|
}
|
||||||
|
@ -3159,7 +3160,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
try:
|
try:
|
||||||
contact = self.session.dht_node._routingTable.getContact(
|
contact = self.session.dht_node._routingTable.getContact(
|
||||||
originalPublisherID)
|
originalPublisherID)
|
||||||
except ValueError:
|
except (ValueError, IndexError):
|
||||||
continue
|
continue
|
||||||
if contact in hosts:
|
if contact in hosts:
|
||||||
blobs = hosts[contact]
|
blobs = hosts[contact]
|
||||||
|
@ -3182,6 +3183,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
blobs = []
|
blobs = []
|
||||||
host = {
|
host = {
|
||||||
"address": contact.address,
|
"address": contact.address,
|
||||||
|
"port": contact.port,
|
||||||
"node_id": contact.id.encode("hex"),
|
"node_id": contact.id.encode("hex"),
|
||||||
"blobs": blobs,
|
"blobs": blobs,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue