mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
channeld: don't send update_fee after shutdown.
See: https://github.com/lightningnetwork/lightning-rfc/pull/367 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
b7856e3512
commit
a0f924376f
1 changed files with 13 additions and 0 deletions
|
@ -904,6 +904,19 @@ static void send_commit(struct peer *peer)
|
|||
return;
|
||||
}
|
||||
|
||||
/* BOLT #2:
|
||||
*
|
||||
* - if no HTLCs remain in either commitment transaction:
|
||||
* - MUST NOT send any `update` message after a `shutdown`.
|
||||
*/
|
||||
if (peer->shutdown_sent[LOCAL] && !channel_has_htlcs(peer->channel)) {
|
||||
status_trace("Can't send commit: final shutdown phase");
|
||||
|
||||
peer->commit_timer = NULL;
|
||||
tal_free(tmpctx);
|
||||
return;
|
||||
}
|
||||
|
||||
/* If we wanted to update fees, do it now. */
|
||||
if (peer->channel->funder == LOCAL
|
||||
&& peer->desired_feerate != channel_feerate(peer->channel, REMOTE)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue