mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
common/bolt12: include correct bolt12 wiregen header.
Don't include exp directly, use an ifdef in common/bolt12 (like we do for peer and onion wiregen files). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
6dab04ebd5
commit
a4bc3e5673
@ -32,6 +32,7 @@
|
||||
#include <channeld/watchtower.h>
|
||||
#include <common/billboard.h>
|
||||
#include <common/blinding.h>
|
||||
#include <common/bolt12.h>
|
||||
#include <common/coin_mvt.h>
|
||||
#include <common/crypto_sync.h>
|
||||
#include <common/dev_disconnect.h>
|
||||
@ -65,9 +66,6 @@
|
||||
#include <inttypes.h>
|
||||
#include <secp256k1.h>
|
||||
#include <stdio.h>
|
||||
#if EXPERIMENTAL_FEATURES
|
||||
#include <wire/bolt12_exp_wiregen.h>
|
||||
#endif
|
||||
#include <wire/common_wiregen.h>
|
||||
#include <wire/onion_wire.h>
|
||||
#include <wire/peer_wire.h>
|
||||
|
@ -12,6 +12,7 @@ COMMON_SRC_NOGEN := \
|
||||
common/bolt11.c \
|
||||
common/bolt11_json.c \
|
||||
common/bolt12.c \
|
||||
common/bolt12_merkle.c \
|
||||
common/channel_config.c \
|
||||
common/channel_id.c \
|
||||
common/coin_mvt.c \
|
||||
@ -91,11 +92,6 @@ endif
|
||||
|
||||
COMMON_SRC_GEN := common/status_wiregen.c common/peer_status_wiregen.c
|
||||
|
||||
ifeq ($(EXPERIMENTAL_FEATURES),1)
|
||||
COMMON_SRC_NOGEN += common/bolt12.c
|
||||
COMMON_SRC_NOGEN += common/bolt12_merkle.c
|
||||
endif
|
||||
|
||||
COMMON_HEADERS_NOGEN := $(COMMON_SRC_NOGEN:.c=.h) \
|
||||
common/closing_fee.h \
|
||||
common/ecdh.h \
|
||||
|
@ -1,7 +1,11 @@
|
||||
#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;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef LIGHTNING_COMMON_BOLT12_MERKLE_H
|
||||
#define LIGHTNING_COMMON_BOLT12_MERKLE_H
|
||||
#include "config.h"
|
||||
#include <wire/bolt12_exp_wiregen.h>
|
||||
#include <common/bolt12.h>
|
||||
|
||||
/**
|
||||
* merkle_tlv - bolt12-style merkle hash of this tlv minus signature fields
|
||||
|
@ -49,7 +49,7 @@ DEVTOOLS_COMMON_OBJS := \
|
||||
|
||||
devtools/bolt11-cli: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/bolt11-cli.o
|
||||
|
||||
devtools/bolt12-cli: $(DEVTOOLS_COMMON_OBJS) $(CCAN_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) $(CCAN_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/decodemsg: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) $(WIRE_PRINT_OBJS) wire/fromwire.o wire/towire.o devtools/print_wire.o devtools/decodemsg.o
|
||||
|
||||
|
@ -68,9 +68,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
#if EXPERIMENTAL_FEATURES
|
||||
#include <wire/bolt12_exp_wiregen.h>
|
||||
#endif
|
||||
#include <wire/wire_io.h>
|
||||
#include <wire/wire_sync.h>
|
||||
|
||||
|
@ -2,7 +2,7 @@ PLUGIN_PAY_SRC := plugins/pay.c
|
||||
PLUGIN_PAY_OBJS := $(PLUGIN_PAY_SRC:.c=.o)
|
||||
|
||||
ifeq ($(EXPERIMENTAL_FEATURES),1)
|
||||
PLUGIN_PAY_EXPERIMENTAL_OBJS := common/bolt12.o common/bolt12_merkle.o wire/bolt12_exp_wiregen.o bitcoin/block.o
|
||||
PLUGIN_PAY_EXPERIMENTAL_OBJS := common/bolt12.o common/bolt12_merkle.o wire/bolt12$(EXP)_wiregen.o bitcoin/block.o
|
||||
endif
|
||||
|
||||
PLUGIN_AUTOCLEAN_SRC := plugins/autoclean.c
|
||||
|
@ -9,6 +9,7 @@ WIRE_HEADERS := wire/onion_defs.h \
|
||||
wire/wire_io.h \
|
||||
wire/peer$(EXP)_wiregen.h \
|
||||
wire/onion$(EXP)_wiregen.h \
|
||||
wire/bolt12$(EXP)_wiregen.h \
|
||||
wire/common_wiregen.h \
|
||||
wire/peer$(EXP)_printgen.h \
|
||||
wire/onion$(EXP)_printgen.h
|
||||
@ -21,6 +22,7 @@ WIRE_SRC := wire/wire_sync.c \
|
||||
wire/tlvstream.c \
|
||||
wire/towire.c \
|
||||
wire/common_wiregen.c \
|
||||
wire/bolt12$(EXP)_wiregen.c \
|
||||
wire/peer$(EXP)_wiregen.c \
|
||||
wire/onion$(EXP)_wiregen.c
|
||||
|
||||
@ -28,11 +30,6 @@ WIRE_PRINT_SRC := \
|
||||
wire/onion$(EXP)_printgen.c \
|
||||
wire/peer$(EXP)_printgen.c
|
||||
|
||||
ifeq ($(EXPERIMENTAL_FEATURES),1)
|
||||
WIRE_HEADERS += wire/bolt12$(EXP)_wiregen.h
|
||||
WIRE_SRC += wire/bolt12$(EXP)_wiregen.c
|
||||
endif
|
||||
|
||||
WIRE_OBJS := $(WIRE_SRC:.c=.o)
|
||||
WIRE_PRINT_OBJS := $(WIRE_PRINT_SRC:.c=.o)
|
||||
$(WIRE_OBJS) $(WIRE_PRINT_OBJS): $(WIRE_HEADERS)
|
||||
|
2
wire/common_wiregen.c
generated
2
wire/common_wiregen.c
generated
@ -100,4 +100,4 @@ bool fromwire_custommsg_out(const tal_t *ctx, const void *p, u8 **msg)
|
||||
fromwire_u8_array(&cursor, &plen, *msg, msg_len);
|
||||
return cursor != NULL;
|
||||
}
|
||||
// SHA256STAMP:c7bc8e19dcbad6f504b8dfb8e1f1d2bc49d86782ef8ba869413461fe5c77faec
|
||||
// SHA256STAMP:c97dcd31559f7a0764d6bad2a532cbe79355b4c7c17b32f60ceb810329959865
|
||||
|
2
wire/common_wiregen.h
generated
2
wire/common_wiregen.h
generated
@ -41,4 +41,4 @@ bool fromwire_custommsg_out(const tal_t *ctx, const void *p, u8 **msg);
|
||||
|
||||
|
||||
#endif /* LIGHTNING_WIRE_COMMON_WIREGEN_H */
|
||||
// SHA256STAMP:c7bc8e19dcbad6f504b8dfb8e1f1d2bc49d86782ef8ba869413461fe5c77faec
|
||||
// SHA256STAMP:c97dcd31559f7a0764d6bad2a532cbe79355b4c7c17b32f60ceb810329959865
|
||||
|
Loading…
Reference in New Issue
Block a user