2017-01-10 15:38:33 +10:30
|
|
|
#! /usr/bin/make
|
|
|
|
|
2020-08-31 10:43:25 +09:30
|
|
|
GOSSIPD_HEADERS_WSRC := gossipd/gossipd_wiregen.h \
|
2020-08-25 11:35:45 +09:30
|
|
|
gossipd/gossipd_peerd_wiregen.h \
|
|
|
|
gossipd/gossip_store_wiregen.h \
|
2019-09-16 20:13:59 +09:30
|
|
|
gossipd/gossipd.h \
|
2018-03-13 12:08:03 +01:00
|
|
|
gossipd/gossip_store.h \
|
2024-01-31 16:02:25 +10:30
|
|
|
gossipd/gossmap_manage.h \
|
2019-09-22 15:23:42 +09:30
|
|
|
gossipd/queries.h \
|
2024-01-31 14:52:33 +10:30
|
|
|
gossipd/txout_failures.h \
|
2024-01-31 14:53:33 +10:30
|
|
|
gossipd/sigcheck.h \
|
2019-10-08 11:45:24 +10:30
|
|
|
gossipd/seeker.h
|
2024-01-31 16:14:13 +10:30
|
|
|
GOSSIPD_HEADERS := $(GOSSIPD_HEADERS_WSRC)
|
2020-08-31 10:43:25 +09:30
|
|
|
|
|
|
|
GOSSIPD_SRC := $(GOSSIPD_HEADERS_WSRC:.h=.c)
|
|
|
|
GOSSIPD_OBJS := $(GOSSIPD_SRC:.c=.o)
|
|
|
|
$(GOSSIPD_OBJS): $(GOSSIPD_HEADERS)
|
2017-01-10 15:38:33 +10:30
|
|
|
|
2017-08-29 01:43:01 +09:30
|
|
|
# Make sure these depend on everything.
|
2020-08-31 10:43:25 +09:30
|
|
|
ALL_C_SOURCES += $(GOSSIPD_SRC)
|
|
|
|
ALL_C_HEADERS += $(GOSSIPD_HEADERS)
|
2017-08-29 13:42:04 +09:30
|
|
|
ALL_PROGRAMS += lightningd/lightning_gossipd
|
2017-01-10 15:38:33 +10:30
|
|
|
|
2020-08-31 10:43:25 +09:30
|
|
|
# Here's what lightningd depends on
|
|
|
|
LIGHTNINGD_CONTROL_HEADERS += gossipd/gossipd_wiregen.h
|
|
|
|
LIGHTNINGD_CONTROL_OBJS += gossipd/gossipd_wiregen.o
|
2017-01-11 09:16:29 +10:30
|
|
|
|
2017-08-29 01:32:01 +09:30
|
|
|
# Common source we use.
|
|
|
|
GOSSIPD_COMMON_OBJS := \
|
2018-11-21 13:40:03 +10:30
|
|
|
bitcoin/chainparams.o \
|
2019-02-20 22:01:48 +10:30
|
|
|
common/amount.o \
|
2021-09-21 16:53:10 +09:30
|
|
|
common/autodata.o \
|
2018-05-10 08:48:19 +09:30
|
|
|
common/base32.o \
|
2018-04-23 16:20:55 +02:00
|
|
|
common/bech32.o \
|
|
|
|
common/bech32_util.o \
|
2019-07-30 14:55:12 +09:30
|
|
|
common/bigsize.o \
|
2017-11-29 12:09:06 +01:00
|
|
|
common/bip32.o \
|
2020-05-15 19:59:53 +09:30
|
|
|
common/channel_id.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/cryptomsg.o \
|
2018-03-29 12:36:45 +10:30
|
|
|
common/daemon.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/daemon_conn.o \
|
2019-09-27 09:32:34 +09:30
|
|
|
common/decode_array.o \
|
2018-07-23 11:53:03 +09:30
|
|
|
common/derive_basepoints.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/dev_disconnect.o \
|
2021-01-08 05:12:47 +10:30
|
|
|
common/ecdh_hsmd.o \
|
2018-01-12 14:10:21 +00:00
|
|
|
common/features.o \
|
2024-01-31 16:02:25 +10:30
|
|
|
common/gossmap.o \
|
|
|
|
common/fp16.o \
|
2020-08-25 11:49:38 +09:30
|
|
|
common/status_wiregen.o \
|
2018-12-03 09:32:11 +10:30
|
|
|
common/key_derive.o \
|
2021-06-10 15:30:19 -05:00
|
|
|
common/lease_rates.o \
|
2018-11-22 08:15:37 +10:30
|
|
|
common/memleak.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/msg_queue.o \
|
2019-04-08 19:28:32 +09:30
|
|
|
common/node_id.o \
|
2021-12-14 17:37:35 -08:00
|
|
|
common/onionreply.o \
|
2019-06-04 03:45:25 +09:30
|
|
|
common/per_peer_state.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/ping.o \
|
2020-10-08 16:40:25 -05:00
|
|
|
common/psbt_open.o \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/pseudorand.o \
|
2020-08-11 14:35:56 +09:30
|
|
|
common/random_select.o \
|
2020-05-15 17:13:22 -05:00
|
|
|
common/setup.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/status.o \
|
2018-02-08 11:55:12 +10:30
|
|
|
common/status_wire.o \
|
2018-01-08 20:31:09 +10:30
|
|
|
common/subdaemon.o \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/timeout.o \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/type_to_string.o \
|
|
|
|
common/utils.o \
|
2017-11-29 12:09:06 +01:00
|
|
|
common/utxo.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/version.o \
|
2017-10-23 14:47:38 +10:30
|
|
|
common/wireaddr.o \
|
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-11 20:39:49 +10:30
|
|
|
common/wire_error.o \
|
2020-08-25 11:46:22 +09:30
|
|
|
connectd/connectd_gossipd_wiregen.o \
|
2023-05-22 10:21:44 +09:30
|
|
|
wire/onion_wiregen.o
|
2017-08-29 01:32:01 +09:30
|
|
|
|
2020-08-31 10:43:25 +09:30
|
|
|
lightningd/lightning_gossipd: $(GOSSIPD_OBJS) $(GOSSIPD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(HSMD_CLIENT_OBJS)
|
2017-01-10 15:38:33 +10:30
|
|
|
|
2020-08-31 10:43:25 +09:30
|
|
|
include gossipd/test/Makefile
|