wire/*: fix up BOLT references.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-06-17 19:43:44 +09:30
committed by Christian Decker
parent 18a6cbd11f
commit ce4eef6943
2 changed files with 12 additions and 9 deletions

View File

@@ -230,10 +230,10 @@ REGISTER_TYPE_TO_HEXSTR(channel_id);
/* BOLT #2: /* BOLT #2:
* *
* This message introduces the `channel_id` to identify the channel, which is * This message introduces the `channel_id` to identify the channel. It's
* derived from the funding transaction by combining the `funding_txid` and * derived from the funding transaction by combining the `funding_txid` and
* the `funding_output_index` using big-endian exclusive-OR * the `funding_output_index`, using big-endian exclusive-OR
* (ie. `funding_output_index` alters the last two bytes). * (i.e. `funding_output_index` alters the last 2 bytes).
*/ */
void derive_channel_id(struct channel_id *channel_id, void derive_channel_id(struct channel_id *channel_id,
struct bitcoin_txid *txid, u16 txout) struct bitcoin_txid *txid, u16 txout)

View File

@@ -6,10 +6,11 @@
/* BOLT #1: /* BOLT #1:
* *
* A node MUST ignore a received message of unknown type, if that type is odd. * A receiving node:
* * - upon receiving a message of _odd_, unknown type:
* A node MUST fail the channels if it receives a message of unknown type, if * - MUST ignore the received message.
* that type is even. * - upon receiving a message of _even_, unknown type:
* - MUST fail the channels.
*/ */
/* Return true if it's an unknown ODD message. cursor is a tal ptr. */ /* Return true if it's an unknown ODD message. cursor is a tal ptr. */
@@ -25,13 +26,15 @@ bool extract_channel_id(const u8 *in_pkt, struct channel_id *channel_id);
* Only the least-significant bit of `channel_flags` is currently * Only the least-significant bit of `channel_flags` is currently
* defined: `announce_channel`. This indicates whether the initiator * defined: `announce_channel`. This indicates whether the initiator
* of the funding flow wishes to advertise this channel publicly to * of the funding flow wishes to advertise this channel publicly to
* the network as detailed within [BOLT #7] * the network, as detailed within [BOLT #7]
*/ */
#define CHANNEL_FLAGS_ANNOUNCE_CHANNEL 1 #define CHANNEL_FLAGS_ANNOUNCE_CHANNEL 1
/* BOLT #2: /* BOLT #2:
* *
* The sender MUST set `funding_satoshis` to less than 2^24 satoshi. * The sending node:
*...
* - MUST set `funding_satoshis` to less than 2^24 satoshi.
*/ */
#define MAX_FUNDING_SATOSHI ((1 << 24) - 1) #define MAX_FUNDING_SATOSHI ((1 << 24) - 1)