build: don't generate experimental variants of wire files.

We no longer have any experimental-only wire definitions.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-05-22 10:21:44 +09:30
parent 45ef16892b
commit 4deb552fe9
19 changed files with 59 additions and 147 deletions

View File

@ -291,14 +291,6 @@ config.vars:
%.o: %.c
@$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<)
# '_exp' inserted before _wiregen.[ch] to demark experimental
# spec-derived headers, which are *not* committed into git.
ifeq ($(EXPERIMENTAL_FEATURES),1)
EXP := _exp
else
EXP :=
endif
# tools/update-mocks.sh does nasty recursive make, must not do this!
ifeq ($(SUPPRESS_GENERATION),1)
SHA256STAMP_CHANGED = false

View File

@ -1,11 +1,7 @@
#ifndef LIGHTNING_COMMON_BOLT12_H
#define LIGHTNING_COMMON_BOLT12_H
#include "config.h"
#if EXPERIMENTAL_FEATURES
#include <wire/bolt12_exp_wiregen.h>
#else
#include <wire/bolt12_wiregen.h>
#endif
struct feature_set;

View File

@ -19,10 +19,10 @@ ALL_C_SOURCES += $(COMMON_TEST_SRC)
ALL_TEST_PROGRAMS += $(COMMON_TEST_PROGRAMS)
# Sphinx test wants to decode TLVs.
common/test/run-sphinx: wire/onion$(EXP)_wiregen.o wire/towire.o wire/fromwire.o
common/test/run-blindedpath_enctlv common/test/run-blindedpath_onion: common/base32.o common/wireaddr.o wire/onion$(EXP)_wiregen.o wire/peer$(EXP)_wiregen.o wire/towire.o wire/fromwire.o wire/tlvstream.o
common/test/run-route_blinding_test: wire/onion$(EXP)_wiregen.o wire/peer$(EXP)_wiregen.o wire/towire.o wire/fromwire.o wire/tlvstream.o common/coin_mvt.o
common/test/run-route_blinding_override_test: common/base32.o common/wireaddr.o wire/onion$(EXP)_wiregen.o wire/peer$(EXP)_wiregen.o wire/towire.o wire/fromwire.o wire/tlvstream.o common/coin_mvt.o
common/test/run-sphinx: wire/onion_wiregen.o wire/towire.o wire/fromwire.o
common/test/run-blindedpath_enctlv common/test/run-blindedpath_onion: common/base32.o common/wireaddr.o wire/onion_wiregen.o wire/peer_wiregen.o wire/towire.o wire/fromwire.o wire/tlvstream.o
common/test/run-route_blinding_test: wire/onion_wiregen.o wire/peer_wiregen.o wire/towire.o wire/fromwire.o wire/tlvstream.o common/coin_mvt.o
common/test/run-route_blinding_override_test: common/base32.o common/wireaddr.o wire/onion_wiregen.o wire/peer_wiregen.o wire/towire.o wire/fromwire.o wire/tlvstream.o common/coin_mvt.o
common/test/run-param \
common/test/run-json: \
@ -38,27 +38,27 @@ common/test/run-json: \
common/type_to_string.o \
common/wireaddr.o \
wire/fromwire.o \
wire/onion$(EXP)_wiregen.o \
wire/peer$(EXP)_wiregen.o \
wire/onion_wiregen.o \
wire/peer_wiregen.o \
wire/towire.o
common/test/run-route common/test/run-route-specific: \
common/amount.o \
common/dijkstra.o \
common/fp16.o \
common/fp16.o \
common/gossmap.o \
common/node_id.o \
common/pseudorand.o \
common/route.o \
wire/fromwire.o \
wire/peer$(EXP)_wiregen.o \
wire/peer_wiregen.o \
wire/towire.o
common/test/run-gossmap_local: \
common/base32.o \
common/wireaddr.o \
wire/fromwire.o \
wire/peer$(EXP)_wiregen.o \
wire/peer_wiregen.o \
wire/tlvstream.o \
wire/towire.o
@ -66,7 +66,7 @@ common/test/run-gossmap_canned: \
common/base32.o \
common/wireaddr.o \
wire/fromwire.o \
wire/peer$(EXP)_wiregen.o \
wire/peer_wiregen.o \
wire/tlvstream.o \
wire/towire.o
@ -80,10 +80,10 @@ common/test/run-bolt12_merkle: \
common/node_id.o \
common/type_to_string.o \
common/wireaddr.o \
wire/bolt12$(EXP)_wiregen.o \
wire/bolt12_wiregen.o \
wire/fromwire.o \
wire/tlvstream.o \
wire/peer$(EXP)_wiregen.o \
wire/peer_wiregen.o \
wire/towire.o
common/test/run-bolt12_merkle-json: \

View File

@ -4,15 +4,10 @@
#include "../bolt12_merkle.c"
#include "../json_parse.c"
#include "../json_parse_simple.c"
#include "../../wire/bolt12_wiregen.c"
#include "../../wire/fromwire.c"
#include "../../wire/peer_wiregen.c"
#include "../../wire/tlvstream.c"
#if EXPERIMENTAL_FEATURES
#include "../../wire/peer_exp_wiregen.c"
#include "../../wire/bolt12_exp_wiregen.c"
#else
#include "../../wire/peer_wiregen.c"
#include "../../wire/bolt12_wiregen.c"
#endif
#include <ccan/tal/grab_file/grab_file.h>
#include <ccan/tal/path/path.h>
#include <common/channel_type.h>

View File

@ -16,13 +16,8 @@ static void maybe_print(const char *fmt, ...);
#include "../onion_message_parse.c"
#include "../sphinx.c"
#include "../type_to_string.c"
#if EXPERIMENTAL_FEATURES
#include "../../wire/onion_exp_wiregen.c"
#include "../../wire/peer_exp_wiregen.c"
#else
#include "../../wire/onion_wiregen.c"
#include "../../wire/peer_wiregen.c"
#endif
#include "../../wire/onion_wiregen.c"
#include "../../wire/peer_wiregen.c"
#include <common/ecdh.h>
#include <common/setup.h>
#include <stdio.h>

View File

@ -8,11 +8,7 @@
#include "../type_to_string.c"
#include "../../wire/towire.c"
#include "../../wire/fromwire.c"
#if EXPERIMENTAL_FEATURES
#include "../../wire/onion_exp_wiregen.c"
#else
#include "../../wire/onion_wiregen.c"
#endif
#include <ccan/tal/grab_file/grab_file.h>
#include <ccan/tal/path/path.h>
#include <common/channel_id.h>

View File

@ -14,11 +14,7 @@
#include "../onion_encode.c"
#include "../sphinx.c"
#include "../type_to_string.c"
#if EXPERIMENTAL_FEATURES
#include "../../wire/onion_exp_wiregen.c"
#else
#include "../../wire/onion_wiregen.c"
#endif
#include "../../wire/onion_wiregen.c"
#include <ccan/tal/grab_file/grab_file.h>
#include <ccan/tal/path/path.h>
#include <common/bolt12.h>

View File

@ -43,8 +43,8 @@ DEVTOOLS_COMMON_OBJS := \
common/utils.o \
common/version.o \
common/wireaddr.o \
wire/onion$(EXP)_wiregen.o \
wire/peer$(EXP)_wiregen.o \
wire/onion_wiregen.o \
wire/peer_wiregen.o \
wire/channel_type_wiregen.o \
wire/tlvstream.o
@ -58,7 +58,7 @@ devtools/bolt11-cli: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) wire/f
devtools/encodeaddr: common/utils.o common/bech32.o devtools/encodeaddr.o
devtools/bolt12-cli: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/bolt12$(EXP)_wiregen.o wire/fromwire.o wire/towire.o common/bolt12.o common/bolt12_merkle.o devtools/bolt12-cli.o common/setup.o common/iso4217.o
devtools/bolt12-cli: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/bolt12_wiregen.o wire/fromwire.o wire/towire.o common/bolt12.o common/bolt12_merkle.o devtools/bolt12-cli.o common/setup.o common/iso4217.o
devtools/decodemsg: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) $(WIRE_PRINT_OBJS) wire/fromwire.o wire/towire.o devtools/print_wire.o devtools/decodemsg.o
@ -73,7 +73,7 @@ devtools/onion.c: ccan/config.h
devtools/onion: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) common/onion_decode.o common/onion_encode.o common/onionreply.o wire/fromwire.o wire/towire.o devtools/onion.o common/sphinx.o
devtools/gossipwith: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/peer$(EXP)_wiregen.o devtools/gossipwith.o common/cryptomsg.o common/cryptomsg.o
devtools/gossipwith: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/peer_wiregen.o devtools/gossipwith.o common/cryptomsg.o common/cryptomsg.o
$(DEVTOOLS_OBJS) $(DEVTOOLS_TOOL_OBJS): wire/wire.h

View File

@ -3,13 +3,8 @@
#include <ccan/opt/opt.h>
#include <ccan/tal/grab_file/grab_file.h>
#include <unistd.h>
#if EXPERIMENTAL_FEATURES
#include <wire/onion_exp_printgen.h>
#include <wire/peer_exp_printgen.h>
#else
#include <wire/onion_printgen.h>
#include <wire/peer_printgen.h>
#endif
#include <wire/onion_printgen.h>
#include <wire/peer_printgen.h>
static char *opt_set_tlvname(const char *arg,
bool (**printwire)(const char *fieldname,

View File

@ -68,7 +68,7 @@ GOSSIPD_COMMON_OBJS := \
common/wireaddr.o \
common/wire_error.o \
connectd/connectd_gossipd_wiregen.o \
wire/onion$(EXP)_wiregen.o
wire/onion_wiregen.o
lightningd/lightning_gossipd: $(GOSSIPD_OBJS) $(GOSSIPD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(HSMD_CLIENT_OBJS)

View File

@ -167,8 +167,8 @@ PLUGIN_COMMON_OBJS := \
common/wireaddr.o \
wire/channel_type_wiregen.o \
wire/fromwire.o \
wire/onion$(EXP)_wiregen.o \
wire/peer$(EXP)_wiregen.o \
wire/onion_wiregen.o \
wire/peer_wiregen.o \
wire/tlvstream.o \
wire/towire.o
@ -182,7 +182,7 @@ 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$(EXP)_wiregen.o bitcoin/block.o common/blindedpay.o common/blindedpath.o common/hmac.o common/blinding.o common/onion_encode.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
plugins/autoclean: $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
@ -192,13 +192,13 @@ plugins/commando: $(PLUGIN_COMMANDO_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJ
# Topology wants to decode node_announcement, and peer_wiregen which
# pulls in some of bitcoin/.
plugins/topology: common/route.o common/dijkstra.o common/gossmap.o common/fp16.o wire/peer$(EXP)_wiregen.o wire/channel_type_wiregen.o bitcoin/block.o bitcoin/preimage.o $(PLUGIN_TOPOLOGY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
plugins/topology: common/route.o common/dijkstra.o common/gossmap.o common/fp16.o wire/peer_wiregen.o wire/channel_type_wiregen.o bitcoin/block.o bitcoin/preimage.o $(PLUGIN_TOPOLOGY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
plugins/txprepare: $(PLUGIN_TXPREPARE_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
plugins/bcli: $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
plugins/keysend: wire/tlvstream.o wire/onion$(EXP)_wiregen.o $(PLUGIN_KEYSEND_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/blindedpay.o common/blindedpath.o common/hmac.o common/blinding.o common/onion_encode.o
plugins/keysend: wire/tlvstream.o wire/onion_wiregen.o $(PLUGIN_KEYSEND_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/blindedpay.o common/blindedpath.o common/hmac.o common/blinding.o common/onion_encode.o
$(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER)
plugins/spenderp: bitcoin/block.o bitcoin/preimage.o bitcoin/psbt.o common/psbt_open.o wire/peer${EXP}_wiregen.o $(PLUGIN_SPENDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)

View File

@ -50,7 +50,7 @@ FUZZ_COMMON_OBJS := \
wire/fromwire.o \
wire/onion_wiregen.o \
wire/peer_wire.o \
wire/peer$(EXP)_wiregen.o \
wire/peer_wiregen.o \
wire/channel_type_wiregen.o \
wire/tlvstream.o \
wire/towire.o \

View File

@ -41,7 +41,7 @@ tools/test/test_gen.h: $(TOOLS_WIRE_DEPS) tools/test/Makefile
tools/test/test_gen.c: $(TOOLS_WIRE_DEPS) tools/test/Makefile
$(BOLT_GEN) --page impl tools/test/test_gen.h test_type < tools/test/test_cases > $@
tools/test/print_gen.h: wire/onion$(EXP)_wiregen.h $(TOOLS_WIRE_DEPS)
tools/test/print_gen.h: wire/onion_wiregen.h $(TOOLS_WIRE_DEPS)
$(BOLT_GEN) -P --page header $@ test_type < tools/test/test_cases > $@
tools/test/print_gen.c: $(TOOLS_WIRE_DEPS)

View File

@ -7,13 +7,13 @@ WIRE_HEADERS := wire/onion_defs.h \
wire/wire.h \
wire/wire_sync.h \
wire/wire_io.h \
wire/peer$(EXP)_wiregen.h \
wire/onion$(EXP)_wiregen.h \
wire/bolt12$(EXP)_wiregen.h \
wire/peer_wiregen.h \
wire/onion_wiregen.h \
wire/bolt12_wiregen.h \
wire/channel_type_wiregen.h \
wire/bolt12$(EXP)_printgen.h \
wire/peer$(EXP)_printgen.h \
wire/onion$(EXP)_printgen.h
wire/bolt12_printgen.h \
wire/peer_printgen.h \
wire/onion_printgen.h
# We don't include peer_printgen/onion_printgen or bolt12 here since most don't need it.
WIRE_SRC := wire/wire_sync.c \
@ -22,59 +22,38 @@ WIRE_SRC := wire/wire_sync.c \
wire/peer_wire.c \
wire/tlvstream.c \
wire/towire.c \
wire/peer$(EXP)_wiregen.c \
wire/peer_wiregen.c \
wire/channel_type_wiregen.c \
wire/onion$(EXP)_wiregen.c
wire/onion_wiregen.c
WIRE_BOLT12_SRC := wire/bolt12$(EXP)_wiregen.c
WIRE_BOLT12_SRC := wire/bolt12_wiregen.c
WIRE_PRINT_SRC := \
wire/onion$(EXP)_printgen.c \
wire/peer$(EXP)_printgen.c \
wire/bolt12$(EXP)_printgen.c \
wire/onion_printgen.c \
wire/peer_printgen.c \
wire/bolt12_printgen.c \
wire/channel_type_printgen.c
WIRE_PRINT_HEADERS := $(WIRE_PRINT_SRC:.c=.h)
WIRE_OBJS := $(WIRE_SRC:.c=.o)
WIRE_PRINT_OBJS := $(WIRE_PRINT_SRC:.c=.o)
WIRE_BOLT12_OBJS := $(WIRE_BOLT12_SRC:.c=.o)
$(WIRE_OBJS) $(WIRE_PRINT_OBJS) $(WIRE_BOLT12_OBJS): $(WIRE_HEADERS)
$(WIRE_OBJS) $(WIRE_PRINT_OBJS) $(WIRE_BOLT12_OBJS): $(WIRE_HEADERS) $(WIRE_PRINT_HEADERS)
# Make sure these depend on everything: in case we're experimental,
# include non-experimental ones here so they get rebuilt.
WIRE_NONEXP_SRC := wire/bolt12_wiregen.c \
wire/peer_wiregen.c \
wire/onion_wiregen.c \
wire/onion_printgen.c \
wire/peer_printgen.c
WIRE_NONEXP_HEADERS := wire/peer_wiregen.h \
wire/onion_wiregen.h \
wire/bolt12_wiregen.h \
wire/peer_printgen.h \
wire/onion_printgen.h \
wire/channel_type_printgen.h
ALL_C_SOURCES += $(WIRE_SRC) $(WIRE_BOLT12_SRC) $(WIRE_PRINT_SRC)
ALL_C_SOURCES += $(WIRE_SRC) $(WIRE_BOLT12_SRC) $(WIRE_PRINT_SRC) $(WIRE_NONEXP_SRC)
ALL_C_HEADERS += $(WIRE_HEADERS) $(WIRE_NONEXP_HEADERS)
ALL_C_HEADERS += $(WIRE_HEADERS)
# They may not have the bolts.
BOLT_EXTRACT=$(LOCAL_BOLTDIR)/tools/extract-formats.py
WIRE_BOLT_DEPS := $(BOLT_DEPS) tools/gen/impl_template tools/gen/header_template
ALL_PEER_PATCHES := $(sort $(wildcard wire/extracted_peer*.patch))
ALL_ONION_PATCHES := $(sort $(wildcard wire/extracted_onion*.patch))
ALL_BOLT12_PATCHES := $(sort $(wildcard wire/extracted_bolt12*.patch))
# These are applied to the non-exp csvs to make the exp csvs.
PEER_EXP_PATCHES := $(sort $(wildcard wire/extracted_peer_exp*.patch))
ONION_EXP_PATCHES := $(sort $(wildcard wire/extracted_onion_exp*.patch))
BOLT12_EXP_PATCHES := $(sort $(wildcard wire/extracted_bolt12_exp*.patch))
# These are always applied to the bolts.
PEER_PATCHES := $(filter-out $(PEER_EXP_PATCHES),$(ALL_PEER_PATCHES))
ONION_PATCHES := $(filter-out $(ONION_EXP_PATCHES),$(ALL_ONION_PATCHES))
BOLT12_PATCHES := $(filter-out $(BOLT12_EXP_PATCHES),$(ALL_BOLT12_PATCHES))
# These are applied to the bolts.
PEER_PATCHES := $(sort $(wildcard wire/extracted_peer*.patch))
ONION_PATCHES := $(sort $(wildcard wire/extracted_onion*.patch))
BOLT12_PATCHES := $(sort $(wildcard wire/extracted_bolt12*.patch))
# Explicit command to re-extract CSV from BOLTs and patch.
# This is not a normal make depencency, since we don't want this
@ -100,23 +79,13 @@ wire/onion_wire.csv.raw: bolt-precheck
wire/bolt12_wire.csv.raw: bolt-precheck
@$(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/12*.md > $@
# How to make the exp versions from non-exp versions:
wire/peer_exp_wire.csv: wire/peer_wire.csv $(PEER_EXP_PATCHES)
@set -e; T=$@; trap "rm -f $$T.$$$$" 0; cp $< $$T.$$$$; for p in $(PEER_EXP_PATCHES); do echo APPLY $$p; patch $$T.$$$$ $$p; done; mv $$T.$$$$ $$T
wire/onion_exp_wire.csv: wire/onion_wire.csv $(ONION_EXP_PATCHES)
@set -e; T=$@; trap "rm -f $$T.$$$$" 0; cp $< $$T.$$$$; for p in $(ONION_EXP_PATCHES); do echo APPLY $$p; patch $$T.$$$$ $$p; done; mv $$T.$$$$ $$T
wire/bolt12_exp_wire.csv: wire/bolt12_wire.csv $(BOLT12_EXP_PATCHES)
@set -e; T=$@; trap "rm -f $$T.$$$$" 0; cp $< $$T.$$$$; for p in $(BOLT12_EXP_PATCHES); do echo APPLY $$p; patch $$T.$$$$ $$p; done; mv $$T.$$$$ $$T
# These can be deleted.
.INTERMEDIATE: wire/peer_wire.csv.raw wire/onion_wire.csv.raw wire/bolt12_wire.csv.raw
# Explicit command to add patchfile for BOLT CSV's against current one.
generate-bolt-csv-patch: bolt-precheck
@$(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/0[127]*.md | diff -u wire/peer$(EXP)_wire.csv - >wire/extracted_peer$(EXP)_$(BOLTVERSION).patch | if [ $$? -lt 0 ];then exit 1;fi; echo wire/extracted_peer$(EXP)_$(BOLTVERSION).patch
@{ echo '#include <wire/onion_defs.h>'; $(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/04*.md; } | diff -u wire/onion$(EXP)_wire.csv - > wire/extracted_onion$(EXP)_$(BOLTVERSION).patch | if [ $$? -lt 0 ];then exit 1;fi; echo wire/extracted_onion$(EXP)_$(BOLTVERSION).patch
@$(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/0[127]*.md | diff -u wire/peer_wire.csv - >wire/extracted_peer_$(BOLTVERSION).patch | if [ $$? -lt 0 ];then exit 1;fi; echo wire/extracted_peer_$(BOLTVERSION).patch
@{ echo '#include <wire/onion_defs.h>'; $(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/04*.md; } | diff -u wire/onion_wire.csv - > wire/extracted_onion_$(BOLTVERSION).patch | if [ $$? -lt 0 ];then exit 1;fi; echo wire/extracted_onion_$(BOLTVERSION).patch
# tlvs_n1 and n2 are used for test vectors, thus not referenced: expose them
# for testing and to prevent compile error about them being unused.
@ -140,8 +109,8 @@ wire/onion_exp_wiregen.c_args := $(wire/onion_wiregen.c_args)
wire/bolt12_wiregen.c_args := -s --expose-tlv-type=tlv_blinded_path --expose-tlv-type=tlv_invoice_request --expose-tlv-type=tlv_invoice
wire/bolt12_wiregen.h_args := --include='bitcoin/short_channel_id.h' --include='bitcoin/signature.h' --include='bitcoin/privkey.h' --include='common/bigsize.h' --include='common/amount.h' --include='common/node_id.h' --include='bitcoin/block.h' --include='wire/onion_wire.h' $(wire/bolt12_wiregen.c_args)
wire/bolt12_printgen.c_args := --expose-tlv-type=tlv_blinded_path --expose-tlv-type=tlv_invoice_request --include='wire/onion$(EXP)_wiregen.h' --include='wire/onion$(EXP)_printgen.h'
wire/bolt12_printgen.h_args := --include='wire/bolt12$(EXP)_wiregen.h' --expose-tlv-type=tlv_blinded_path --expose-tlv-type=tlv_invoice_request
wire/bolt12_printgen.c_args := --expose-tlv-type=tlv_blinded_path --expose-tlv-type=tlv_invoice_request --include='wire/onion_wiregen.h' --include='wire/onion_printgen.h'
wire/bolt12_printgen.h_args := --include='wire/bolt12_wiregen.h' --expose-tlv-type=tlv_blinded_path --expose-tlv-type=tlv_invoice_request
# Same for _exp versions
wire/bolt12_exp_wiregen.h_args := $(wire/bolt12_wiregen.h_args)
@ -155,7 +124,7 @@ wire/channel_type_wiregen.h_args := -s
wire/channel_type_wiregen.c_args := $(wire/channel_type_wiregen.h_args)
# All generated wire/ files depend on this Makefile
$(filter %printgen.h %printgen.c %wiregen.h %wiregen.c, $(WIRE_SRC) $(WIRE_BOLT12_SRC) $(WIRE_PRINT_SRC) $(WIRE_NONEXP_SRC) $(WIRE_HEADERS) $(WIRE_NONEXP_HEADERS)): wire/Makefile
$(filter %printgen.h %printgen.c %wiregen.h %wiregen.c, $(WIRE_SRC) $(WIRE_BOLT12_SRC) $(WIRE_PRINT_SRC) $(WIRE_HEADERS)): wire/Makefile
maintainer-clean: wire-maintainer-clean
@ -164,6 +133,7 @@ clean: wire-clean
wire-clean:
$(RM) wire/*.csv.*
$(RM) wire/channel_type_*gen*
$(RM) wire/*_exp_*gen.[ch] # From when we had experimental builds
wire-maintainer-clean: wire-clean
$(RM) wire/gen_*_csv wire/extracted_*_experimental_csv

View File

@ -3,10 +3,6 @@
#include "config.h"
#include <stdbool.h>
#if EXPERIMENTAL_FEATURES
#include <wire/onion_exp_wiregen.h>
#else
#include <wire/onion_wiregen.h>
#endif
#endif /* LIGHTNING_WIRE_ONION_WIRE_H */

View File

@ -3,11 +3,7 @@
#include "config.h"
#include <stdbool.h>
#if EXPERIMENTAL_FEATURES
#include <wire/peer_exp_wiregen.h>
#else
#include <wire/peer_wiregen.h>
#endif
/* BOLT #1:
*

View File

@ -20,9 +20,7 @@ WIRE_TEST_COMMON_OBJS := \
# run-tlvstream.c needs to reach into bitcoin/pubkey for SUPERVERBOSE
$(WIRE_TEST_PROGRAMS): $(WIRE_TEST_COMMON_OBJS) $(filter-out bitcoin/pubkey.o bitcoin/chainparams.o,$(BITCOIN_OBJS))
# We put a dependency on non-exp sources here, so they get built even if
# we're EXPERIMENTAL_FEATURES.
$(WIRE_TEST_OBJS): $(WIRE_HEADERS) $(WIRE_SRC) $(WIRE_PRINT_SRC) $(WIRE_NONEXP_SRC)
$(WIRE_TEST_OBJS): $(WIRE_HEADERS) $(WIRE_SRC) $(WIRE_PRINT_SRC)
wire-tests: $(WIRE_TEST_PROGRAMS:%=unittest/%)

View File

@ -12,11 +12,7 @@ static const char *reason;
#include <common/node_id.c>
#include <common/setup.h>
#if EXPERIMENTAL_FEATURES
#include <wire/peer_exp_wiregen.c>
#else
#include <wire/peer_wiregen.c>
#endif
#include <wire/fromwire.c>
#include <wire/towire.c>
#include <wire/tlvstream.c>

View File

@ -70,13 +70,4 @@ u8 *fromwire_tal_arrn(const tal_t *ctx,
char *fromwire_wirestring(const tal_t *ctx, const u8 **cursor, size_t *max);
void fromwire_siphash_seed(const u8 **cursor, size_t *max,
struct siphash_seed *seed);
#if !EXPERIMENTAL_FEATURES
/* Stubs, as this subtype is only defined when EXPERIMENTAL_FEATURES */
struct onionmsg_path;
void towire_onionmsg_path(u8 **p, const struct onionmsg_path *onionmsg_path);
struct onionmsg_path *
fromwire_onionmsg_path(const tal_t *ctx, const u8 **cursor, size_t *plen);
#endif /* EXPERIMENTAL_FEATURES */
#endif /* LIGHTNING_WIRE_WIRE_H */