diff --git a/wire/fromwire.c b/wire/fromwire.c index 9fa2dddad..e05caaff8 100644 --- a/wire/fromwire.c +++ b/wire/fromwire.c @@ -230,10 +230,10 @@ REGISTER_TYPE_TO_HEXSTR(channel_id); /* 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 - * the `funding_output_index` using big-endian exclusive-OR - * (ie. `funding_output_index` alters the last two bytes). + * the `funding_output_index`, using big-endian exclusive-OR + * (i.e. `funding_output_index` alters the last 2 bytes). */ void derive_channel_id(struct channel_id *channel_id, struct bitcoin_txid *txid, u16 txout) diff --git a/wire/peer_wire.h b/wire/peer_wire.h index 84dbfefdd..67cf015b6 100644 --- a/wire/peer_wire.h +++ b/wire/peer_wire.h @@ -6,10 +6,11 @@ /* BOLT #1: * - * A node MUST ignore a received message of unknown type, if that type is odd. - * - * A node MUST fail the channels if it receives a message of unknown type, if - * that type is even. + * A receiving node: + * - upon receiving a message of _odd_, unknown type: + * - MUST ignore the received message. + * - 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. */ @@ -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 * defined: `announce_channel`. This indicates whether the initiator * 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 /* 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)