Let getEnr JSON-RPC also return local ENR (#1705)
This commit is contained in:
parent
6535b39e47
commit
0105e3e8cf
|
@ -55,6 +55,9 @@ proc installPortalApiHandlers*(
|
|||
return true
|
||||
|
||||
rpcServer.rpc("portal_" & network & "GetEnr") do(nodeId: NodeId) -> Record:
|
||||
if p.localNode.id == nodeId:
|
||||
return p.localNode.record
|
||||
|
||||
let node = p.getNode(nodeId)
|
||||
if node.isSome():
|
||||
return node.get().record
|
||||
|
|
Loading…
Reference in New Issue