Browse Source

BOLT 2 updates for fix placment of chain_hash req

See 4b62d26af9
json-streaming
lisa neigut 6 years ago
committed by Rusty Russell
parent
commit
73ea6d0038
  1. 2
      Makefile
  2. 9
      openingd/openingd.c

2
Makefile

@ -9,7 +9,7 @@ CCANDIR := ccan
# Where we keep the BOLT RFCs
BOLTDIR := ../lightning-rfc/
BOLTVERSION := 21e3688e843f82267b3970cda69fa93158dc9517
BOLTVERSION := 4b62d26af93a07166d6a9de2cb5eff80849d9c19
-include config.vars

9
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) {

Loading…
Cancel
Save