Skip to content

Commit

Permalink
BOLTs: Add typo fixes and clarifications from "More clarifications ar…
Browse files Browse the repository at this point in the history
…ound `channel_announcement` handling (ElementsProject#1220)"

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Mar 3, 2025
1 parent 15909fc commit a50970f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
3 changes: 1 addition & 2 deletions common/gossip_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
#define ROUTING_OPT_HTLC_MAX_MSAT (1 << 0)
#define ROUTING_OPT_DONT_FORWARD (1 << 1)

/* This quote comes in a later version: mark it out temporarily */
/* BOLT-FIXME #7:
/* BOLT #7:
*
* - If the funding transaction has less than 6 confirmations:
* - MUST NOT send `channel_announcement`.
Expand Down
23 changes: 12 additions & 11 deletions lightningd/channel_gossip.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static void stash_remote_announce_sigs(struct channel *channel,
const char *err;

/* BOLT #7:
* - if the `node_signature` OR the `bitcoin_signature` is NOT correct:
* - If the `node_signature` OR the `bitcoin_signature` is NOT correct:
* - MAY send a `warning` and close the connection, or send an
* `error` and fail the channel.
*/
Expand Down Expand Up @@ -680,10 +680,13 @@ void channel_gossip_got_announcement_sigs(struct channel *channel,
return;
case CGOSSIP_ANNOUNCED:
/* BOLT #7:
* - upon reconnection (once the above timing requirements
* - Upon reconnection (once the above timing requirements
* have been met):
* - MUST respond to the first `announcement_signatures`
* message with its own `announcement_signatures` message.
*...
* - If it receives `announcement_signatures` for the
* funding transaction:
* - MUST respond with its own `announcement_signatures`
* message.
*/
send_channel_announce_sigs(channel);
check_channel_gossip(channel);
Expand Down Expand Up @@ -912,13 +915,11 @@ void channel_gossip_channel_reestablished(struct channel *channel)
return;
case CGOSSIP_NEED_PEER_SIGS:
/* BOLT #7:
* - upon reconnection (once the above timing
* requirements have been met):
* ...
* - if it has NOT received an
* `announcement_signatures` message:
* - SHOULD retransmit the
* `announcement_signatures` message.
* - Upon reconnection (once the above timing requirements have
* been met):
* - If it has NOT previously received
* `announcement_signatures` for the funding transaction:
* - MUST send its own `announcement_signatures` message.
*/
send_private_cupdate(channel, true);
send_channel_announce_sigs(channel);
Expand Down

0 comments on commit a50970f

Please sign in to comment.