Browse Source

bolt: update to aa33af0c4d7ae0180c04ef98e61af49c1f876a36

This introduces the TLV test vectors.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pull/2938/head
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
00ca52ea07
  1. 2
      Makefile
  2. 7
      wire/Makefile
  3. 14
      wire/extracted_peer_wire_csv

2
Makefile

@ -15,7 +15,7 @@ CCANDIR := ccan
# Where we keep the BOLT RFCs
BOLTDIR := ../lightning-rfc/
BOLTVERSION := 950b2f5481c2a4b57ef1102e2374543e81c4aa88
BOLTVERSION := aa33af0c4d7ae0180c04ef98e61af49c1f876a36
-include config.vars

7
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 < $< > $@

14
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

Loading…
Cancel
Save