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