Browse Source

Update to latest BOLT.

And nail "make check-source" to that specific version (which is a commit id,
not a branch name, so needs a different syntax for git).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
a9002eac52
  1. 4
      Makefile
  2. 2
      common/sphinx.c
  3. 2
      gossipd/handshake.c
  4. 4
      lightningd/bolt11.c
  5. 2
      lightningd/peer_htlcs.c

4
Makefile

@ -6,7 +6,7 @@ CCANDIR := ccan
# Where we keep the BOLT RFCs # Where we keep the BOLT RFCs
BOLTDIR := ../lightning-rfc/ BOLTDIR := ../lightning-rfc/
BOLTVERSION := master BOLTVERSION := 58d4d9bca3ae5896eeea4b46324df27b8ecb0ce1
# If you don't have (working) valgrind. # If you don't have (working) valgrind.
#NO_VALGRIND := 1 #NO_VALGRIND := 1
@ -190,7 +190,7 @@ bolt-check/%: % bolt-precheck tools/check-bolt
@[ ! -d .tmp.lightningrfc ] || tools/check-bolt .tmp.lightningrfc $< @[ ! -d .tmp.lightningrfc ] || tools/check-bolt .tmp.lightningrfc $<
bolt-precheck: bolt-precheck:
@rm -rf .tmp.lightningrfc; if [ ! -d $(BOLTDIR) ]; then echo Not checking BOLT references: BOLTDIR $(BOLTDIR) does not exist >&2; exit 0; fi; set -e; if [ -n "$(BOLTVERSION)" ]; then git clone -q -b $(BOLTVERSION) $(BOLTDIR) .tmp.lightningrfc; else cp -a $(BOLTDIR) .tmp.lightningrfc; fi @rm -rf .tmp.lightningrfc; if [ ! -d $(BOLTDIR) ]; then echo Not checking BOLT references: BOLTDIR $(BOLTDIR) does not exist >&2; exit 0; fi; set -e; if [ -n "$(BOLTVERSION)" ]; then git clone -q $(BOLTDIR) .tmp.lightningrfc && cd .tmp.lightningrfc && git checkout -q $(BOLTVERSION); else cp -a $(BOLTDIR) .tmp.lightningrfc; fi
check-source-bolt: $(ALL_TEST_PROGRAMS:%=bolt-check/%.c) check-source-bolt: $(ALL_TEST_PROGRAMS:%=bolt-check/%.c)

2
common/sphinx.c

@ -487,7 +487,7 @@ u8 *create_onionreply(const tal_t *ctx, const struct secret *shared_secret,
/* BOLT #4: /* BOLT #4:
* *
* Where `hmac` is an HMAC authenticating the remainder of the packet, * Where `hmac` is an HMAC authenticating the remainder of the packet,
* with a key using the above key generation with key type "_um_" * with a key using the above key generation with key type `um`
*/ */
generate_key(key, "um", 2, shared_secret->data); generate_key(key, "um", 2, shared_secret->data);

2
gossipd/handshake.c

@ -35,7 +35,7 @@ enum bolt8_side {
/* BOLT #8: /* BOLT #8:
* *
* Act One is sent from initiator tog responder. During `Act One`, the * Act One is sent from initiator to responder. During `Act One`, the
* initiator attempts to satisfy an implicit challenge by the responder. To * initiator attempts to satisfy an implicit challenge by the responder. To
* complete this challenge, the initiator _must_ know the static public key of * complete this challenge, the initiator _must_ know the static public key of
* the responder. * the responder.

4
lightningd/bolt11.c

@ -752,7 +752,7 @@ static void push_field(u5 **data, char type, const void *src, size_t nbits)
/* BOLT #11: /* BOLT #11:
* *
* SHOULD use the minimum `data_length` possible. * SHOULD use the minimum `data_length` possible for `x` and `c` fields.
*/ */
static void push_varlen_field(u5 **data, char type, u64 val) static void push_varlen_field(u5 **data, char type, u64 val)
{ {
@ -1007,7 +1007,7 @@ struct bolt11 *bolt11_out_check(const struct bolt11 *b11, const char *abortstr)
{ {
struct bolt11_field *extra; struct bolt11_field *extra;
/* BOLT #11: /* BOLT #2:
* *
* For channels with `chain_hash` identifying the Bitcoin blockchain, * For channels with `chain_hash` identifying the Bitcoin blockchain,
* the sending node MUST set the 4 most significant bytes of * the sending node MUST set the 4 most significant bytes of

2
lightningd/peer_htlcs.c

@ -527,7 +527,7 @@ static void forward_htlc(struct htlc_in *hin,
/* BOLT #4: /* BOLT #4:
* *
* If the cltv-expiry is too near, we tell them the the current channel * If the `cltv_expiry` is too near, we tell them the the current channel
* setting for the outgoing channel: * setting for the outgoing channel:
* 1. type: UPDATE|14 (`expiry_too_soon`) * 1. type: UPDATE|14 (`expiry_too_soon`)
* 2. data: * 2. data:

Loading…
Cancel
Save