jsonrpc: Added 'getnodes' to list known nodes.

getnodes returns an object containing a single array of 'nodes'. Each
element contains the node's ID, its hostname and its port. If
unknown (because we haven't seen a node announcement yet) then the port
is 0 and the hostname is null.
This commit is contained in:
Christian Decker
2016-09-30 15:30:19 +02:00
parent 2a5a114f27
commit 594eb8109c
3 changed files with 39 additions and 0 deletions

View File

@@ -285,6 +285,7 @@ static const struct json_command *cmdlist[] = {
&getlog_command,
&connect_command,
&getpeers_command,
&getnodes_command,
&gethtlcs_command,
&close_command,
&newaddr_command,