mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
wire/*: fix up BOLT references.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
18a6cbd11f
commit
ce4eef6943
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user