nimbus-eth1/fluffy/rpc/rpc_calls/rpc_portal_calls.nim
Kim De Mey 2ea35ef82a
Add resolve call for Portal networks (#902)
* Add resolve call for Portal networks

And:
- Refactor some code by adding a findNodeVerified call
- add the portal network lookup json-rpc call that uses resolve
- add usage of this lookup in the portal testnet tests
- Additional comments

* Let recordsFromBytes fail on invalid ENRs

This behaviour is more similar as how it is done in discovery v5
base layer.
2021-12-08 09:26:31 +01:00

12 lines
485 B
Nim

## Portal State Network json-rpc calls
proc portal_state_nodeInfo(): NodeInfo
proc portal_state_routingTableInfo(): RoutingTableInfo
proc portal_state_lookupEnr(nodeId: NodeId): Record
proc portal_state_recursiveFindNodes(): seq[Record]
## Portal History Network json-rpc calls
proc portal_history_nodeInfo(): NodeInfo
proc portal_history_routingTableInfo(): RoutingTableInfo
proc portal_history_lookupEnr(nodeId: NodeId): Record
proc portal_history_recursiveFindNodes(): seq[Record]