11/*~ Welcome to the gossip daemon: keeper of maps!
22 *
3- * This is the last "global" daemon; it has three purposes.
3+ * This is the last "global" daemon; it has one main purpose: to
4+ * maintain the append-only gossip_store file for other daemons and
5+ * plugins to read the global network map.
46 *
5- * 1. To determine routes for payments when lightningd asks.
6- * 2. The second purpose is to receive gossip from peers (via their
7- * per-peer daemons) and send it out to them.
8- * 3. Talk to `connectd` to to answer address queries for nodes.
7+ * To do this, it gets gossip messages forwarded from connectd, makes
8+ * gossip queries to peers, and can ask connect out to random peers to
9+ * get more gossip.
910 *
1011 * The gossip protocol itself is fairly simple, but has some twists which
1112 * add complexity to this daemon.
1415#include <ccan/tal/str/str.h>
1516#include <common/clock_time.h>
1617#include <common/daemon_conn.h>
17- #include <common/ecdh_hsmd.h>
1818#include <common/memleak.h>
1919#include <common/status.h>
2020#include <common/subdaemon.h>
@@ -591,9 +591,6 @@ int main(int argc, char *argv[])
591591 daemon -> deferred_txouts = tal_arr (daemon , struct short_channel_id , 0 );
592592 daemon -> current_blockheight = 0 ; /* i.e. unknown */
593593
594- /* Tell the ecdh() function how to talk to hsmd */
595- ecdh_hsmd_setup (HSM_FD , status_failed );
596-
597594 /* Note the use of time_mono() here. That's a monotonic clock, which
598595 * is really useful: it can only be used to measure relative events
599596 * (there's no correspondence to time-since-Ken-grew-a-beard or
@@ -620,8 +617,9 @@ int main(int argc, char *argv[])
620617 }
621618}
622619
623- /*~ Note that the actual routing stuff is in routing.c; you might want to
624- * check that out later.
620+ /*~ Note that the production of the gossip_store file is in gossmap_manage.c
621+ * and gossip_store.c, and the (highly optimized!) read side is in
622+ * common/gossmap.c; you might want to check those out later.
625623 *
626624 * But that's the last of the global daemons. We now move on to the first of
627625 * the per-peer daemons: openingd/openingd.c.
0 commit comments