diff --git a/Makefile b/Makefile index d736259f4..49b406f87 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ CCANDIR := ccan # Where we keep the BOLT RFCs BOLTDIR := ../lightning-rfc/ -BOLTVERSION := 950b2f5481c2a4b57ef1102e2374543e81c4aa88 +BOLTVERSION := aa33af0c4d7ae0180c04ef98e61af49c1f876a36 -include config.vars diff --git a/wire/Makefile b/wire/Makefile index efcd99399..1d30e612e 100644 --- a/wire/Makefile +++ b/wire/Makefile @@ -67,11 +67,14 @@ endif # We (may) need to rebuild these if config changes wire/gen_peer_wire_csv wire/gen_onion_wire_csv: config.vars +# 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. +# This will be easier if test vectors are moved to separate files. wire/gen_peer_wire.h: wire/gen_peer_wire_csv $(WIRE_BOLT_DEPS) - $(BOLT_GEN) -s --page header $@ wire_type < $< > $@ + $(BOLT_GEN) -s --expose-tlv-type=n1 --expose-tlv-type=n2 --page header $@ wire_type < $< > $@ wire/gen_peer_wire.c: wire/gen_peer_wire_csv $(WIRE_BOLT_DEPS) - $(BOLT_GEN) -s --page impl ${@:.c=.h} wire_type < $< > $@ + $(BOLT_GEN) -s --expose-tlv-type=n1 --expose-tlv-type=n2 --page impl ${@:.c=.h} wire_type < $< > $@ wire/gen_onion_wire.h: wire/gen_onion_wire_csv $(WIRE_BOLT_DEPS) $(BOLT_GEN) -s --page header $@ onion_type < $< > $@ diff --git a/wire/extracted_peer_wire_csv b/wire/extracted_peer_wire_csv index 4b7cb442a..f7658db47 100644 --- a/wire/extracted_peer_wire_csv +++ b/wire/extracted_peer_wire_csv @@ -14,6 +14,20 @@ msgdata,ping,ignored,byte,byteslen msgtype,pong,19 msgdata,pong,byteslen,u16, msgdata,pong,ignored,byte,byteslen +tlvtype,n1,tlv1,1 +tlvdata,n1,tlv1,amount_msat,tu64, +tlvtype,n1,tlv2,2 +tlvdata,n1,tlv2,scid,short_channel_id, +tlvtype,n1,tlv3,3 +tlvdata,n1,tlv3,node_id,point, +tlvdata,n1,tlv3,amount_msat_1,u64, +tlvdata,n1,tlv3,amount_msat_2,u64, +tlvtype,n1,tlv4,254 +tlvdata,n1,tlv4,cltv_delta,u16, +tlvtype,n2,tlv1,0 +tlvdata,n2,tlv1,amount_msat,tu64, +tlvtype,n2,tlv2,11 +tlvdata,n2,tlv2,cltv_expiry,tu32, msgtype,open_channel,32 msgdata,open_channel,chain_hash,chain_hash, msgdata,open_channel,temporary_channel_id,byte,32