core-lightning/gossipd/test
Rusty Russell 9b900138d0 gossip: put 'routing_channel' in charge of 'node_connection'.
This makes 'routing_channel' the primary object in the system; it can have
one or two 'node_connection's attached, and points to two nodes.

The nodes are freed when no more routing_channel refer to them.  The
routing_channel are freed when they contain no more 'node_connection'.
This fixes #1072 which I surmise was caused by a dangling
routing_channel after pruning.

Each node contains a single array of 'routing_channel's, not one for
each direction.  The 'routing_channel' itself orders nodes in key
order (conveniently the index is equal to the direction flag we use),
and 'node_connection' with source in the same order.

There are helpers to assist with common questions like "which
'node_connection' leads out of this node?".

There are now two ways to find a channel:
1. Direct scid lookup via rstate->channels map.
2. Node key lookup, followed by channel traversal.

Several FIXMEs are inserted for where we can now do things more optimally.

Fixes: #1072
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-03-03 19:29:35 +01:00
..
.gitignore gossipd/test/run-bench-find_route: don't abort if we try to route to ourselves 2017-12-20 13:57:28 +01:00
Makefile gossipd: Check features in node_announcement and channel_announcement. 2018-01-13 11:29:42 +01:00
run-bench-find_route.c gossip: put 'routing_channel' in charge of 'node_connection'. 2018-03-03 19:29:35 +01:00
run-find_route-specific.c gossip: put 'routing_channel' in charge of 'node_connection'. 2018-03-03 19:29:35 +01:00
run-find_route.c gossip: put 'routing_channel' in charge of 'node_connection'. 2018-03-03 19:29:35 +01:00
run-initiator-success.c Mark intentionally unused parameters as such (with "UNUSED") 2018-02-22 01:09:12 +00:00
run-responder-success.c Mark intentionally unused parameters as such (with "UNUSED") 2018-02-22 01:09:12 +00:00