From ac40fdf4141a393514ab250640d6bdb5afd3dc87 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 20 Mar 2024 10:59:28 +1030 Subject: [PATCH] Makefiles: remove dependency on wire/onion_wiregen.o where unnecessary. Also, WIRE_ONION_OBJS hasn't existed for a while. Signed-off-by: Rusty Russell --- channeld/Makefile | 2 +- closingd/Makefile | 2 +- gossipd/Makefile | 3 +-- lightningd/Makefile | 2 +- plugins/Makefile | 7 ++----- plugins/renepay/Makefile | 2 +- plugins/renepay/test/run-arc.c | 7 +++++++ plugins/renepay/test/run-dijkstra.c | 10 ++++++++++ plugins/renepay/test/run-mcf-diamond.c | 7 +++++++ plugins/renepay/test/run-mcf.c | 7 +++++++ plugins/renepay/test/run-payflow_map.c | 10 ++++++++++ plugins/renepay/test/run-testflow.c | 7 +++++++ 12 files changed, 55 insertions(+), 11 deletions(-) diff --git a/channeld/Makefile b/channeld/Makefile index 940cd1128..d6aff5630 100644 --- a/channeld/Makefile +++ b/channeld/Makefile @@ -104,6 +104,6 @@ CHANNELD_COMMON_OBJS := \ channeld/full_channel_error_names_gen.h: channeld/full_channel_error.h ccan/ccan/cdump/tools/cdump-enumstr ccan/ccan/cdump/tools/cdump-enumstr channeld/full_channel_error.h > $@ -lightningd/lightning_channeld: $(CHANNELD_OBJS) $(WIRE_ONION_OBJS) $(CHANNELD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS) +lightningd/lightning_channeld: $(CHANNELD_OBJS) $(CHANNELD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS) include channeld/test/Makefile diff --git a/closingd/Makefile b/closingd/Makefile index b7da71f42..a238ef6f0 100644 --- a/closingd/Makefile +++ b/closingd/Makefile @@ -62,6 +62,6 @@ CLOSINGD_COMMON_OBJS := \ gossipd/gossip_store_wiregen.o \ gossipd/gossipd_peerd_wiregen.o -lightningd/lightning_closingd: $(CLOSINGD_OBJS) $(WIRE_ONION_OBJS) $(CLOSINGD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS) +lightningd/lightning_closingd: $(CLOSINGD_OBJS) $(CLOSINGD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS) -include closingd/test/Makefile diff --git a/gossipd/Makefile b/gossipd/Makefile index c18a5d325..9498fa48c 100644 --- a/gossipd/Makefile +++ b/gossipd/Makefile @@ -69,8 +69,7 @@ GOSSIPD_COMMON_OBJS := \ common/version.o \ common/wireaddr.o \ common/wire_error.o \ - connectd/connectd_gossipd_wiregen.o \ - wire/onion_wiregen.o + connectd/connectd_gossipd_wiregen.o lightningd/lightning_gossipd: $(GOSSIPD_OBJS) $(GOSSIPD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(HSMD_CLIENT_OBJS) diff --git a/lightningd/Makefile b/lightningd/Makefile index b40a7244f..ea61d6ffa 100644 --- a/lightningd/Makefile +++ b/lightningd/Makefile @@ -161,6 +161,6 @@ lightningd/plugin.o: plugins/list_of_builtin_plugins_gen.h lightningd/channel_state_names_gen.h: lightningd/channel_state.h ccan/ccan/cdump/tools/cdump-enumstr ccan/ccan/cdump/tools/cdump-enumstr lightningd/channel_state.h > $@ -lightningd/lightningd: $(LIGHTNINGD_OBJS) $(WALLET_OBJS) $(LIGHTNINGD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(WIRE_BOLT12_OBJS) $(WIRE_ONION_OBJS) $(LIGHTNINGD_CONTROL_OBJS) $(HSMD_CLIENT_OBJS) $(DB_OBJS) +lightningd/lightningd: $(LIGHTNINGD_OBJS) $(WALLET_OBJS) $(LIGHTNINGD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(WIRE_BOLT12_OBJS) $(LIGHTNINGD_CONTROL_OBJS) $(HSMD_CLIENT_OBJS) $(DB_OBJS) include lightningd/test/Makefile diff --git a/plugins/Makefile b/plugins/Makefile index 7467610db..465d7e6f8 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -169,16 +169,13 @@ PLUGIN_COMMON_OBJS := \ common/psbt_open.o \ common/pseudorand.o \ common/random_select.o \ - common/scb_wiregen.o \ common/setup.o \ common/status_levels.o \ common/type_to_string.o \ common/utils.o \ common/version.o \ common/wireaddr.o \ - wire/channel_type_wiregen.o \ wire/fromwire.o \ - wire/onion_wiregen.o \ wire/peer_wiregen.o \ wire/tlvstream.o \ wire/towire.o @@ -194,11 +191,11 @@ ALL_PROGRAMS += $(C_PLUGINS) # Make all plugins depend on all plugin headers, for simplicity. $(PLUGIN_ALL_OBJS): $(PLUGIN_ALL_HEADER) -plugins/pay: $(PLUGIN_PAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/gossmap.o common/fp16.o common/route.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o wire/bolt12_wiregen.o bitcoin/block.o common/blindedpay.o common/blindedpath.o common/hmac.o common/blinding.o common/onion_encode.o common/gossmods_listpeerchannels.o +plugins/pay: $(PLUGIN_PAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/gossmap.o common/fp16.o common/route.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o wire/bolt12_wiregen.o bitcoin/block.o common/blindedpay.o common/blindedpath.o common/hmac.o common/blinding.o common/onion_encode.o common/gossmods_listpeerchannels.o wire/onion_wiregen.o plugins/autoclean: $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) -plugins/chanbackup: $(PLUGIN_chanbackup_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) +plugins/chanbackup: $(PLUGIN_chanbackup_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/scb_wiregen.o wire/channel_type_wiregen.o plugins/commando: $(PLUGIN_COMMANDO_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) diff --git a/plugins/renepay/Makefile b/plugins/renepay/Makefile index 9abbb3dc7..4858e8613 100644 --- a/plugins/renepay/Makefile +++ b/plugins/renepay/Makefile @@ -11,6 +11,6 @@ ALL_C_HEADERS += $(PLUGIN_RENEPAY_HDRS) # Make all plugins depend on all plugin headers, for simplicity. $(PLUGIN_RENEPAY_OBJS): $(PLUGIN_RENEPAY_HDRS) -plugins/cln-renepay: $(PLUGIN_RENEPAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) bitcoin/chainparams.o common/gossmap.o common/gossmods_listpeerchannels.o common/fp16.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o wire/bolt12$(EXP)_wiregen.o +plugins/cln-renepay: $(PLUGIN_RENEPAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) bitcoin/chainparams.o common/gossmap.o common/gossmods_listpeerchannels.o common/fp16.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o wire/bolt12$(EXP)_wiregen.o wire/onion_wiregen.o include plugins/renepay/test/Makefile diff --git a/plugins/renepay/test/run-arc.c b/plugins/renepay/test/run-arc.c index 8ce0744c3..4d7c63a1e 100644 --- a/plugins/renepay/test/run-arc.c +++ b/plugins/renepay/test/run-arc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "../mcf.c" @@ -26,12 +27,18 @@ double flowset_probability(const tal_t *ctx UNNEEDED, struct flow **flows UNNEED const struct gossmap *const gossmap UNNEEDED, struct chan_extra_map *chan_extra_map UNNEEDED, char **fail UNNEEDED) { fprintf(stderr, "flowset_probability called!\n"); abort(); } +/* Generated stub for fromwire_blinded_path */ +struct blinded_path *fromwire_blinded_path(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED) +{ fprintf(stderr, "fromwire_blinded_path called!\n"); abort(); } /* Generated stub for get_chan_extra_half_by_chan */ struct chan_extra_half *get_chan_extra_half_by_chan(const struct gossmap *gossmap UNNEEDED, struct chan_extra_map *chan_extra_map UNNEEDED, const struct gossmap_chan *chan UNNEEDED, int dir UNNEEDED) { fprintf(stderr, "get_chan_extra_half_by_chan called!\n"); abort(); } +/* Generated stub for towire_blinded_path */ +void towire_blinded_path(u8 **p UNNEEDED, const struct blinded_path *blinded_path UNNEEDED) +{ fprintf(stderr, "towire_blinded_path called!\n"); abort(); } /* AUTOGENERATED MOCKS END */ int main(int argc, char *argv[]) diff --git a/plugins/renepay/test/run-dijkstra.c b/plugins/renepay/test/run-dijkstra.c index ef416df67..f4d7f2ee2 100644 --- a/plugins/renepay/test/run-dijkstra.c +++ b/plugins/renepay/test/run-dijkstra.c @@ -6,9 +6,19 @@ #include #include #include +#include #include +/* AUTOGENERATED MOCKS START */ +/* Generated stub for fromwire_blinded_path */ +struct blinded_path *fromwire_blinded_path(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED) +{ fprintf(stderr, "fromwire_blinded_path called!\n"); abort(); } +/* Generated stub for towire_blinded_path */ +void towire_blinded_path(u8 **p UNNEEDED, const struct blinded_path *blinded_path UNNEEDED) +{ fprintf(stderr, "towire_blinded_path called!\n"); abort(); } +/* AUTOGENERATED MOCKS END */ + static void insertion_in_increasing_distance(const tal_t *ctx) { struct dijkstra *dijkstra = dijkstra_new(ctx,10); diff --git a/plugins/renepay/test/run-mcf-diamond.c b/plugins/renepay/test/run-mcf-diamond.c index 1f6571d5c..a93347f8b 100644 --- a/plugins/renepay/test/run-mcf-diamond.c +++ b/plugins/renepay/test/run-mcf-diamond.c @@ -16,10 +16,17 @@ #include #include #include +#include /* AUTOGENERATED MOCKS START */ +/* Generated stub for fromwire_blinded_path */ +struct blinded_path *fromwire_blinded_path(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED) +{ fprintf(stderr, "fromwire_blinded_path called!\n"); abort(); } /* Generated stub for pay_plugin */ struct pay_plugin *pay_plugin; +/* Generated stub for towire_blinded_path */ +void towire_blinded_path(u8 **p UNNEEDED, const struct blinded_path *blinded_path UNNEEDED) +{ fprintf(stderr, "towire_blinded_path called!\n"); abort(); } /* Generated stub for try_paying */ const char *try_paying(const tal_t *ctx UNNEEDED, struct payment *payment UNNEEDED, diff --git a/plugins/renepay/test/run-mcf.c b/plugins/renepay/test/run-mcf.c index f552cd091..959eb3cdd 100644 --- a/plugins/renepay/test/run-mcf.c +++ b/plugins/renepay/test/run-mcf.c @@ -16,10 +16,17 @@ #include #include #include +#include /* AUTOGENERATED MOCKS START */ +/* Generated stub for fromwire_blinded_path */ +struct blinded_path *fromwire_blinded_path(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED) +{ fprintf(stderr, "fromwire_blinded_path called!\n"); abort(); } /* Generated stub for pay_plugin */ struct pay_plugin *pay_plugin; +/* Generated stub for towire_blinded_path */ +void towire_blinded_path(u8 **p UNNEEDED, const struct blinded_path *blinded_path UNNEEDED) +{ fprintf(stderr, "towire_blinded_path called!\n"); abort(); } /* Generated stub for try_paying */ const char *try_paying(const tal_t *ctx UNNEEDED, struct payment *payment UNNEEDED, diff --git a/plugins/renepay/test/run-payflow_map.c b/plugins/renepay/test/run-payflow_map.c index 1d3c65261..6a6fccd4d 100644 --- a/plugins/renepay/test/run-payflow_map.c +++ b/plugins/renepay/test/run-payflow_map.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -20,6 +21,15 @@ #define RENEPAY_UNITTEST #include +/* AUTOGENERATED MOCKS START */ +/* Generated stub for fromwire_blinded_path */ +struct blinded_path *fromwire_blinded_path(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED) +{ fprintf(stderr, "fromwire_blinded_path called!\n"); abort(); } +/* Generated stub for towire_blinded_path */ +void towire_blinded_path(u8 **p UNNEEDED, const struct blinded_path *blinded_path UNNEEDED) +{ fprintf(stderr, "towire_blinded_path called!\n"); abort(); } +/* AUTOGENERATED MOCKS END */ + static void destroy_payflow( struct pay_flow *p, struct payflow_map * map) diff --git a/plugins/renepay/test/run-testflow.c b/plugins/renepay/test/run-testflow.c index 25764ce65..f94aee8a6 100644 --- a/plugins/renepay/test/run-testflow.c +++ b/plugins/renepay/test/run-testflow.c @@ -8,6 +8,7 @@ #include #include #include +#include #define MYLOG "/tmp/debug.txt" #define RENEPAY_UNITTEST // logs are written in MYLOG @@ -17,8 +18,14 @@ #include "../mcf.c" /* AUTOGENERATED MOCKS START */ +/* Generated stub for fromwire_blinded_path */ +struct blinded_path *fromwire_blinded_path(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED) +{ fprintf(stderr, "fromwire_blinded_path called!\n"); abort(); } /* Generated stub for pay_plugin */ struct pay_plugin *pay_plugin; +/* Generated stub for towire_blinded_path */ +void towire_blinded_path(u8 **p UNNEEDED, const struct blinded_path *blinded_path UNNEEDED) +{ fprintf(stderr, "towire_blinded_path called!\n"); abort(); } /* Generated stub for try_paying */ const char *try_paying(const tal_t *ctx UNNEEDED, struct payment *payment UNNEEDED,