connectd: new daemon to handle connections.

This is just copying most of gossipd/gossip.c into connectd/connect.c.
It shares the same wire format as gossipd during transition, and changes
are deliberately minimal.

It also has an additional message 'connect_reconnected' which it sends
to the master daemon to tell it to kill a peer; gossipd relied on
closing the gossipfd to do this, but connectd doesn't maintain an fd
with remote peers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-24 15:48:58 +09:30
parent 8e3bc84634
commit eab83ca79b
7 changed files with 2066 additions and 0 deletions

1940
connectd/connect.c Normal file

File diff suppressed because it is too large Load Diff