rgb-cln/gossipd
Rusty Russell 474887512d gossipd: rewrite to do the handshake internally.
Now the flow is much simpler from a lightningd POV:

1. If we want to connect to a peer, just send gossipd `gossipctl_reach_peer`.
2. Every new peer, gossipd hands up to lightningd, with global/local features
   and the peer fd and a gossip fd using `gossip_peer_connected`
3. If lightningd doesn't want it, it just hands the peerfd and global/local
   features back to gossipd using `gossipctl_handle_peer`
4. If a peer sends a non-gossip msg (eg `open_channel`) the gossipd sends
   it up using `gossip_peer_nongossip`.
5. If lightningd wants to fund a channel, it simply calls `release_channel`.

Notes:
* There's no more "unique_id": we use the peer id.
* For the moment, we don't ask gossipd when we're told to list peers, so
  connected peers without a channel don't appear in the JSON getpeers API.
* We add a `gossipctl_peer_addrhint` for the moment, so you can connect to
  a specific ip/port, but using other sources is a TODO.
* We now (correctly) only give up on reaching a peer after we exchange init
  messages, which changes the test_disconnect case.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-20 18:31:32 +02:00
..
test gossipd: include ccan/io version of handshake code, with tests. 2017-10-20 18:31:32 +02:00
Makefile gossipd: rewrite to do the handshake internally. 2017-10-20 18:31:32 +02:00
broadcast.c Rename subdaemons, move them into top level. 2017-08-29 17:54:14 +02:00
broadcast.h Rename subdaemons, move them into top level. 2017-08-29 17:54:14 +02:00
gossip.c gossipd: rewrite to do the handshake internally. 2017-10-20 18:31:32 +02:00
gossip_wire.csv gossipd: rewrite to do the handshake internally. 2017-10-20 18:31:32 +02:00
handshake.c gossipd: include ccan/io version of handshake code, with tests. 2017-10-20 18:31:32 +02:00
handshake.h gossipd: include ccan/io version of handshake code, with tests. 2017-10-20 18:31:32 +02:00
routing.c gossip: fix address descriptor handling. 2017-09-03 02:01:54 +02:00
routing.h gossip: fix address descriptor handling. 2017-09-03 02:01:54 +02:00