mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 15:44:21 +01:00
check-bolt: use new BOLTs.
The structure is slightly different, so this requires some fixes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
2
Makefile
2
Makefile
@@ -241,7 +241,7 @@ check-makefile: check-daemon-makefile
|
||||
|
||||
# Any mention of BOLT# must be followed by an exact quote, modulo whitepace.
|
||||
check-source-bolt: check-bolt
|
||||
@if [ ! -d $(BOLTDIR) ]; then echo Not checking BOLT references: BOLTDIR $(BOLTDIR) does not exist >&2; else rm -rf .tmp.lightningrfc; git clone -q -b $(BOLTVERSION) $(BOLTDIR) .tmp.lightningrfc && ./check-bolt .tmp.lightningrfc $(CORE_SRC) $(BITCOIN_SRC) $(DAEMON_SRC) $(CORE_HEADERS) $(BITCOIN_HEADERS) $(DAEMON_HEADERS) $(TEST_PROGRAMS:=.c); fi
|
||||
@if [ ! -d $(BOLTDIR) ]; then echo Not checking BOLT references: BOLTDIR $(BOLTDIR) does not exist >&2; else rm -rf .tmp.lightningrfc; git clone -q -b $(BOLTVERSION) $(BOLTDIR) .tmp.lightningrfc && ./check-bolt .tmp.lightningrfc $(CORE_SRC) $(BITCOIN_SRC) $(DAEMON_SRC) $(CORE_HEADERS) $(BITCOIN_HEADERS) $(DAEMON_HEADERS) $(WIRE_SRC) $(WIRE_HEADERS) $(TEST_PROGRAMS:=.c); fi
|
||||
|
||||
check-bolt: check-bolt.o $(CCAN_OBJS)
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ static char *canonicalize(char *str)
|
||||
return str;
|
||||
}
|
||||
|
||||
static void get_files(const char *dir, const char *subdir,
|
||||
static bool get_files(const char *dir, const char *subdir,
|
||||
struct bolt_file **files)
|
||||
{
|
||||
char *path = path_join(NULL, dir, subdir);
|
||||
@@ -50,7 +50,7 @@ static void get_files(const char *dir, const char *subdir,
|
||||
struct dirent *e;
|
||||
|
||||
if (!d)
|
||||
err(1, "Opening BOLT dir %s", path);
|
||||
return false;
|
||||
|
||||
while ((e = readdir(d)) != NULL) {
|
||||
int preflen;
|
||||
@@ -82,13 +82,16 @@ static void get_files(const char *dir, const char *subdir,
|
||||
e->d_name)));
|
||||
n++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct bolt_file *get_bolt_files(const char *dir)
|
||||
{
|
||||
struct bolt_file *bolts = tal_arr(NULL, struct bolt_file, 0);
|
||||
|
||||
get_files(dir, "bolts", &bolts);
|
||||
if (!get_files(dir, ".", &bolts))
|
||||
err(1, "Opening BOLT dir %s", dir);
|
||||
/* This currently does not exist. */
|
||||
get_files(dir, "early-drafts", &bolts);
|
||||
return bolts;
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
wire-wrongdir:
|
||||
$(MAKE) -C .. wire-all
|
||||
|
||||
WIRE_OBJS := wire/gen_wire.o \
|
||||
wire/fromwire.o \
|
||||
wire/towire.o
|
||||
|
||||
WIRE_HEADERS := wire/wire.h
|
||||
WIRE_GEN_HEADERS := wire/gen_wire.h
|
||||
WIRE_GEN_SRC := wire/gen_wire.c
|
||||
WIRE_SRC := wire/fromwire.c \
|
||||
wire/towire.c
|
||||
|
||||
WIRE_OBJS := $(WIRE_SRC:.c=.o) $(WIRE_GEN_SRC:.c=.o)
|
||||
|
||||
# They may not have the bolts.
|
||||
BOLT_EXTRACT=$(BOLTDIR)/tools/extract-formats.py
|
||||
|
||||
Reference in New Issue
Block a user