Commit Graph

7 Commits

Author SHA1 Message Date
Michael Schmoock 9a48221892 fix: remove spammy debug statements from getroute
Fixes #4617
https://github.com/ElementsProject/lightning/issues/4617

Changelog-None
2021-07-01 12:14:33 -05:00
Rusty Russell 75720ad0e1 lightningd: wait for gossipd to finish initalizing before starting plugins.
This mainly helps our CI under valgrind, which starts a fresh instance
and immediately calls the invoice command.  This can cause the topology
plugin to try to access the gossmap file before it's created.

We can also move the gossmap reading in topology to init time.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-06-16 10:29:17 +09:30
Rusty Russell 9e1b830191 plugins/topology: listincoming function to help invoices.
Invoices need to know what the peers' update contains, to create
routehints.  It also wants to know if a peer has no other public
channels (so-called "dead end" peers) to eliminate them from routehint
consideration.

This was previously done by a special function to ask gossipd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-06-16 10:29:17 +09:30
Rusty Russell 280f5a71a8 plugins/topology: add listnodes command.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-06-16 10:29:17 +09:30
Rusty Russell 1a7731cfbf plugins/topology: make listchannels mark disconnected local channels active=false.
This is blurring the lines a bit, but it's closer to what gossipd did.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-06-16 10:29:17 +09:30
Rusty Russell 63d97d2467 plugins/topology: listchannels command.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-06-16 10:29:17 +09:30
Rusty Russell e81e640e76 topology: plugin to implement getroute command.
Temporarily rename old getroute to getrouteold (we will remove this).

Changelog-Changed: JSON-RPC: `getroute` is now implemented in a plugin.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-06-16 10:29:17 +09:30