<p>LND has an option to close a channel unilaterally as following command,</p>

<pre><code>$lncli closechannel --force funding_txid output_index
</code></pre>

<p>I have transmitted a commitment transaction to answer <a href="https://bitcoin.stackexchange.com/questions/74719/lightning-close-channel-transaction-example/85778#85778">this question</a>. It might be another useful resource of your work.</p>

CC BY-SA 4.0
2019-04-17T07:07:05.340Z
2019-04-17T07:07:05.340Z
ogw_yuya
<p>Generally it is preferable to collaboratively close a channel as it is faster for both sides and saves onchain fees and space. As far as I know implementations do not provide an api to the close command by which you can enforce a certain type of close. In order to achieve what you want you have 2 options:</p>

<ol>
<li>You Patch your lightning node to provide that api yourself</li>
<li>You run two lightning nodes with a channel between them. Then you turn off one node and run the close command on the other. As the first node is not peered the nodes can't close collaboratively so there will happen a force close. </li>
</ol>

CC BY-SA 4.0
2019-04-17T04:05:39.370Z
2019-04-17T04:05:39.370Z
Rene Pickhardt
<p>How would you transmit a commitment transaction from a lightning network channel instead of closing the channel? I am working on implementing a watchtower and I first need to simulate a double spend attempt. When I close a channel with $ lncli closechannel, both nodes have the bitcoin available and neither has to wait for the time lock. Is there a command to get the node to submit a unilateral close commitment transaction where one of them has to wait for the time lock?</p>

<lightning-network>
how to transmit commitment transaction (unilateral close) from lightning network channel
Joel Davidson
# how to transmit commitment transaction (unilateral close) from lightning network channel

(Asked by: username_0 on 2019-04-17)

How would you transmit a commitment transaction from a lightning network channel instead of closing the channel? I am working on implementing a watchtower and I first need to simulate a double spend attempt. When I close a channel with $ lncli closechannel, both nodes have the bitcoin available and neither has to wait for the time lock. Is there a command to get the node to submit a unilateral close commitment transaction where one of them has to wait for the time lock?

**Tags:** lightning-network


---

## 2 answers

### Answer by username_1 on 2019-04-17. Score: 3

LND has an option to close a channel unilaterally as following command,

```
$lncli closechannel --force funding_txid output_index

```

I have transmitted a commitment transaction to answer [this question](https://bitcoin.stackexchange.com/questions/74719/lightning-close-channel-transaction-example/85778#85778). It might be another useful resource of your work.


---

### Answer by username_2 on 2019-04-17. Score: 2

Generally it is preferable to collaboratively close a channel as it is faster for both sides and saves onchain fees and space. As far as I know implementations do not provide an api to the close command by which you can enforce a certain type of close. In order to achieve what you want you have 2 options:

1. You Patch your lightning node to provide that api yourself
2. You run two lightning nodes with a channel between them. Then you turn off one node and run the close command on the other. As the first node is not peered the nodes can't close collaboratively so there will happen a force close.


---

