mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
channel lease: only send update_blockheight iff has channel lease
otherwise the peer may not know to expect it.
This commit is contained in:
@@ -2451,9 +2451,11 @@ static void resend_commitment(struct peer *peer, struct changed_htlc *last)
|
||||
channel_feerate(peer->channel, REMOTE));
|
||||
sync_crypto_write(peer->pps, take(msg));
|
||||
|
||||
msg = towire_update_blockheight(NULL, &peer->channel_id,
|
||||
channel_blockheight(peer->channel, REMOTE));
|
||||
sync_crypto_write(peer->pps, take(msg));
|
||||
if (peer->channel->lease_expiry > 0) {
|
||||
msg = towire_update_blockheight(NULL, &peer->channel_id,
|
||||
channel_blockheight(peer->channel, REMOTE));
|
||||
sync_crypto_write(peer->pps, take(msg));
|
||||
}
|
||||
}
|
||||
|
||||
/* Re-send the commitment_signed itself. */
|
||||
|
||||
Reference in New Issue
Block a user