@@ -605,8 +605,9 @@ A sending node:
605
605
- MUST NOT send a ` shutdown ` .
606
606
- MUST NOT send multiple ` shutdown ` messages.
607
607
- MUST NOT send an ` update_add_htlc ` after a ` shutdown ` .
608
- - if no HTLCs remain in either commitment transaction:
609
- - MUST NOT send any ` update ` message after a ` shutdown ` .
608
+ - if no HTLCs remain in either commitment transaction (including dust HTLCs)
609
+ and neither side has a pending ` revoke_and_ack ` to send:
610
+ - MUST NOT send any ` update ` message after that point.
610
611
- SHOULD fail to route any HTLC added after it has sent ` shutdown ` .
611
612
- if it sent a non-zero-length ` shutdown_scriptpubkey ` in ` open_channel ` or ` accept_channel ` :
612
613
- MUST send the same value in ` scriptpubkey ` .
@@ -638,10 +639,13 @@ shutdown starts, the question of how to behave if it wasn't is avoided:
638
639
the sender always sends a ` commitment_signed ` first.
639
640
640
641
As shutdown implies a desire to terminate, it implies that no new
641
- HTLCs will be added or accepted. Once any HTLCs are cleared, the peer
642
- may immediately begin closing negotiation, so we ban further updates
643
- to the commitment transaction (in particular, ` update_fee ` would be
644
- possible otherwise).
642
+ HTLCs will be added or accepted. Once any HTLCs are cleared, there are no commitments
643
+ for which a revocation is owed, and all updates are included on both commitment
644
+ transactions, the peer may immediately begin closing negotiation, so we ban further
645
+ updates to the commitment transaction (in particular, ` update_fee ` would be
646
+ possible otherwise). However, while there are HTLCs on the commitment transaction,
647
+ the initiator may find it desirable to increase the feerate as there may be pending
648
+ HTLCs on the commitment which could timeout.
645
649
646
650
The ` scriptpubkey ` forms include only standard segwit forms accepted by
647
651
the Bitcoin network, which ensures the resulting transaction will
@@ -660,8 +664,9 @@ The `shutdown` response requirement implies that the node sends `commitment_sign
660
664
661
665
### Closing Negotiation: ` closing_signed `
662
666
663
- Once shutdown is complete and the channel is empty of HTLCs, the final
664
- current commitment transactions will have no HTLCs, and closing fee
667
+ Once shutdown is complete, the channel is empty of HTLCs, there are no commitments
668
+ for which a revocation is owed, and all updates are included on both commitments,
669
+ the final current commitment transactions will have no HTLCs, and closing fee
665
670
negotiation begins. The funder chooses a fee it thinks is fair, and
666
671
signs the closing transaction with the ` scriptpubkey ` fields from the
667
672
` shutdown ` messages (along with its chosen fee) and sends the signature;
0 commit comments