Skip to content

Commit d3f7fca

Browse files
do not broadcast / bump / cpfp commitment if manual_broadcast=true and funding_tx is not broadcasted yet
1 parent 71f9060 commit d3f7fca

File tree

4 files changed

+698
-15
lines changed

4 files changed

+698
-15
lines changed

lightning-liquidity/src/lsps2/service.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,13 @@ where
15951595
/// Stores the funding transaction for a JIT channel.
15961596
///
15971597
/// Call this when the funding transaction is created.
1598+
///
1599+
/// In `client_trusts_lsp` the broadcasting of the funding transaction will be handled internally
1600+
/// after you also mark it as broadcast-safe via
1601+
/// [`set_funding_tx_broadcast_safe`] and once the opening fee has been collected. You do not need
1602+
/// to broadcast the funding transaction yourself in this flow.
1603+
///
1604+
/// [`set_funding_tx_broadcast_safe`]: Self::set_funding_tx_broadcast_safe
15981605
pub fn store_funding_transaction(
15991606
&self, user_channel_id: u128, counterparty_node_id: &PublicKey, funding_tx: Transaction,
16001607
) -> Result<(), APIError> {
@@ -1640,7 +1647,8 @@ where
16401647
/// the intercepted payment.
16411648
///
16421649
/// In a `client_trusts_lsp` flow, after this is set and the opening fee has been fully skimmed,
1643-
/// the channel's funding transaction will be broadcasted.
1650+
/// the channel's funding transaction will be broadcasted if the channel is still usable.
1651+
/// If the channel has been closed or force-closed before this point, the funding transaction will not be broadcasted.
16441652
///
16451653
/// [`Event::FundingTxBroadcastSafe`]: lightning::events::Event::FundingTxBroadcastSafe
16461654
pub fn set_funding_tx_broadcast_safe(

0 commit comments

Comments
 (0)