core-lightning/devtools/Makefile
Rusty Russell 01c02fd617 devtools/decodemsg: decode encoded_short_ids.
$ devtools/decodemsg 010806226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f000000000000ffff0100160178da6360486760606400824c285d00a60111710144
$ devtools/decodemsg 010506226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f00110000006700000100000000690000010000

Before:
    WIRE_REPLY_CHANNEL_RANGE:
    chain_hash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
    first_blocknum=0
    number_of_blocks=65535
    complete=1
    encoded_short_ids=[0178da6360486760606400824c285d00a60111710144]
    WIRE_QUERY_SHORT_CHANNEL_IDS:
    chain_hash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
    encoded_short_ids=[0000006700000100000000690000010000]

After:

    WIRE_REPLY_CHANNEL_RANGE:
    chain_hash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
    first_blocknum=0
    number_of_blocks=65535
    complete=1
    encoded_short_ids=[ (ZLIB) 103:1:0 105:1:0 112:1:0 ]
    WIRE_QUERY_SHORT_CHANNEL_IDS:
    chain_hash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
    encoded_short_ids=[ (UNCOMPRESSED) 103:1:0 105:1:0 ]

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-01 14:55:29 +02:00

47 lines
1.8 KiB
Makefile

DEVTOOLS_SRC := devtools/gen_print_wire.c devtools/print_wire.c
DEVTOOLS_OBJS := $(DEVTOOLS_SRC:.c=.o)
DEVTOOLS_TOOL_SRC := devtools/bolt11-cli.c devtools/decodemsg.c devtools/onion.c
DEVTOOLS_TOOL_OBJS := $(DEVTOOLS_TOOL_SRC:.c=.o)
DEVTOOLS_COMMON_OBJS := \
common/base32.o \
common/bech32.o \
common/bech32_util.o \
common/bolt11.o \
common/decode_short_channel_ids.o \
common/hash_u5.o \
common/type_to_string.o \
common/utils.o \
common/version.o \
common/wireaddr.o
devtools-all: devtools/bolt11-cli devtools/decodemsg devtools/onion
devtools/gen_print_wire.h: $(WIRE_GEN) wire/gen_peer_wire_csv
$(WIRE_GEN) --bolt --printwire --header $@ wire_type < wire/gen_peer_wire_csv > $@
devtools/gen_print_wire.c: $(WIRE_GEN) wire/gen_peer_wire_csv
$(WIRE_GEN) --bolt --printwire ${@:.c=.h} wire_type < wire/gen_peer_wire_csv > $@
devtools/bolt11-cli: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/bolt11-cli.o
devtools/decodemsg: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/decodemsg.o
devtools/onion.c: ccan/config.h
devtools/onion: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/onion.o common/sphinx.o
$(DEVTOOLS_OBJS) $(DEVTOOLS_TOOL_OBJS): wire/wire.h devtools/gen_print_wire.h
devtools/gen_print_wire.o: devtools/gen_print_wire.h wire/gen_peer_wire.h devtools/print_wire.h
# Make sure these depend on everything.
ALL_PROGRAMS += devtools/bolt11-cli devtools/decodemsg devtools/onion
ALL_OBJS += $(DEVTOOLS_OBJS) $(DEVTOOLS_TOOL_OBJS)
check-source: $(DEVTOOLS_SRC:%=check-src-include-order/%) $(DEVTOOLS_TOOLS_SRC:%=check-src-include-order/%)
clean: devtools-clean
devtools-clean:
$(RM) $(DEVTOOLS_CLI_OBJS)