mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
Update to new spec: differentiate channel_id and short_channel_id.
The spec 4af8e1841151f0c6e8151979d6c89d11839b2f65 uses a 32-byte 'channel-id' field, not to be confused with the 8-byte short ID used by gossip. Rename appropriately, and update to the new handshake protocol. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -19,12 +19,11 @@ void peer_failed(int peer_fd, struct crypto_state *cs,
|
||||
|
||||
/* BOLT #1:
|
||||
*
|
||||
* A node sending `error` MUST fail the channel referred to by the
|
||||
* `channel-id`, or if `channel-id` is `0xFFFFFFFFFFFFFFFF` it MUST
|
||||
* fail all channels and MUST close the connection.
|
||||
* The channel is referred to by `channel-id` unless `channel-id` is
|
||||
* zero (ie. all bytes zero), in which case it refers to all channels.
|
||||
*/
|
||||
if (!channel_id) {
|
||||
memset(&all_channels, 0xFF, sizeof(all_channels));
|
||||
memset(&all_channels, 0, sizeof(all_channels));
|
||||
channel_id = &all_channels;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user