mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
gossipd: remove connectd functionality, enable connectd.
This patch guts gossipd of all peer-related functionality, and hands all the peer-related requests to channeld instead. gossipd now gets the final announcable addresses in its init msg, since it doesn't handle socket binding any more. lightningd now actually starts connectd, and activates it. The init messages for both gossipd and connectd still contain redundant fields which need cleaning up. There are shims to handle the fact that connectd's wire messages are still (mostly) gossipd messages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -208,6 +208,7 @@ static void shutdown_subdaemons(struct lightningd *ld)
|
||||
db_begin_transaction(ld->wallet->db);
|
||||
/* Let everyone shutdown cleanly. */
|
||||
close(ld->hsm_fd);
|
||||
subd_shutdown(ld->connectd, 10);
|
||||
subd_shutdown(ld->gossip, 10);
|
||||
subd_shutdown(ld->hsm, 10);
|
||||
|
||||
@@ -423,9 +424,9 @@ int main(int argc, char *argv[])
|
||||
/* Create PID file */
|
||||
pidfile_create(ld);
|
||||
|
||||
/* Activate gossip daemon. Needs to be after the initialization of
|
||||
/* Activate connect daemon. Needs to be after the initialization of
|
||||
* chaintopology, otherwise we may be asking for uninitialized data. */
|
||||
gossip_activate(ld);
|
||||
connectd_activate(ld);
|
||||
|
||||
/* Replay transactions for all running onchainds */
|
||||
onchaind_replay_channels(ld);
|
||||
|
||||
Reference in New Issue
Block a user