From 73ea6d0038d8580e88c4bb162ef57c313391bcb8 Mon Sep 17 00:00:00 2001 From: lisa neigut Date: Thu, 20 Sep 2018 13:13:53 -0700 Subject: [PATCH] BOLT 2 updates for fix placment of chain_hash req See https://github.com/lightningnetwork/lightning-rfc/commit/4b62d26af93a07166d6a9de2cb5eff80849d9c19 --- Makefile | 2 +- openingd/openingd.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8c6448e9b..29d25591c 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ CCANDIR := ccan # Where we keep the BOLT RFCs BOLTDIR := ../lightning-rfc/ -BOLTVERSION := 21e3688e843f82267b3970cda69fa93158dc9517 +BOLTVERSION := 4b62d26af93a07166d6a9de2cb5eff80849d9c19 -include config.vars diff --git a/openingd/openingd.c b/openingd/openingd.c index 4478f545d..72060c76c 100644 --- a/openingd/openingd.c +++ b/openingd/openingd.c @@ -440,7 +440,6 @@ static u8 *funder_channel(struct state *state, /* BOLT #2: * * The receiver: - *... * - if `minimum_depth` is unreasonably large: * - MAY reject the channel. */ @@ -704,10 +703,9 @@ static u8 *fundee_channel(struct state *state, const u8 *open_channel_msg) /* BOLT #2: * - * The receiver: - * - if the `chain_hash` value, within the `open_channel`, message is - * set to a hash of a chain that is unknown to the receiver: - * - MUST reject the channel. + * The receiving node MUST fail the channel if: + * - the `chain_hash` value is set to a hash of a chain + * that is unknown to the receiver. */ if (!bitcoin_blkid_eq(&chain_hash, &state->chainparams->genesis_blockhash)) { @@ -733,6 +731,7 @@ static u8 *fundee_channel(struct state *state, const u8 *open_channel_msg) /* BOLT #2: * * The receiving node MUST fail the channel if: + * ... * - `push_msat` is greater than `funding_satoshis` * 1000. */ if (state->push_msat > state->funding_satoshis * 1000) {