mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
channeld: fix funding_locked retransmission using latest revision of BOLT2.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
42c9cb58c7
commit
ee9ebbc184
@@ -1486,11 +1486,13 @@ again:
|
|||||||
|
|
||||||
/* BOLT #2:
|
/* BOLT #2:
|
||||||
*
|
*
|
||||||
* On reconnection, a node MUST retransmit `funding_locked` unless it
|
* If `next_local_commitment_number` is 1 in both the
|
||||||
* has received an `update_` or `revoke_and_ack` for that channel,
|
* `channel_reestablish` it sent and received, then the node MUST
|
||||||
* otherwise it MAY retransmit `funding_locked`.
|
* retransmit `funding_locked`, otherwise it MUST NOT.
|
||||||
*/
|
*/
|
||||||
if (peer->funding_locked[LOCAL]) {
|
if (peer->funding_locked[LOCAL]
|
||||||
|
&& peer->next_index[LOCAL] == 1
|
||||||
|
&& next_local_commitment_number == 1) {
|
||||||
u8 *msg;
|
u8 *msg;
|
||||||
struct pubkey next_per_commit_point;
|
struct pubkey next_per_commit_point;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user