mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-25 02:15:30 +00:00
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
|
return true
|
||||||
|
|
||||||
rpcServer.rpc("portal_" & network & "GetEnr") do(nodeId: NodeId) -> Record:
|
rpcServer.rpc("portal_" & network & "GetEnr") do(nodeId: NodeId) -> Record:
|
||||||
|
if p.localNode.id == nodeId:
|
||||||
|
return p.localNode.record
|
||||||
|
|
||||||
let node = p.getNode(nodeId)
|
let node = p.getNode(nodeId)
|
||||||
if node.isSome():
|
if node.isSome():
|
||||||
return node.get().record
|
return node.get().record
|
||||||
|
Loading…
x
Reference in New Issue
Block a user