<p>As far as I know the lightning clients that I know of (LND, c-lightning) do not offer this possibility through their API.</p>

<p>So you'd be right to patch the code yourself. For LND, you should have a look at the ForceClose, which is the code that handles unilateral closing of a channel. It uses a CloseTx which it get's from the wire. If you could change that Tx to an earlier one, you would unilaterally close the channel with a fraudulent commitment transaction.</p>

<p>Take a look at the code here: <a href="https://github.com/lightningnetwork/lnd/blob/c37ea68ba6e1153478419914d1aa3bfcaf7abe5b/lnwallet/channel.go#L5684" rel="nofollow noreferrer">https://github.com/lightningnetwork/lnd/blob/c37ea68ba6e1153478419914d1aa3bfcaf7abe5b/lnwallet/channel.go#L5684</a></p>

CC BY-SA 4.0
2019-05-06T05:53:34.830Z
2019-05-06T05:53:34.830Z
gijswijs
<p>I'm trying to simulate a fraudulent commitment transaction on lightning. How would you submit an earlier commitment transaction. It doesn't seem like this can be done with a command. Does anyone know where in the code (LND or C-lightning) you could change it to do this?</p>

<lightning-network><ln-penalty-transaction><ln-closing-channels>
How to transmit fraudulent commitment transaction on lightning channel?
Joel Davidson
# How to transmit fraudulent commitment transaction on lightning channel?

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

I'm trying to simulate a fraudulent commitment transaction on lightning. How would you submit an earlier commitment transaction. It doesn't seem like this can be done with a command. Does anyone know where in the code (LND or C-lightning) you could change it to do this?

**Tags:** lightning-network, ln-penalty-transaction, ln-closing-channels


---

## 1 answers

### Answer by username_1 on 2019-05-06. Score: 1

As far as I know the lightning clients that I know of (LND, c-lightning) do not offer this possibility through their API.

So you'd be right to patch the code yourself. For LND, you should have a look at the ForceClose, which is the code that handles unilateral closing of a channel. It uses a CloseTx which it get's from the wire. If you could change that Tx to an earlier one, you would unilaterally close the channel with a fraudulent commitment transaction.

Take a look at the code here: <https://github.com/lightningnetwork/lnd/blob/c37ea68ba6e1153478419914d1aa3bfcaf7abe5b/lnwallet/channel.go#L5684>


---

