<p>The meaning of the <code>ONCHAIN</code> status means that the channels it is closed, you are missing 99 more blocks before that your channels if forgetting by c-lightning.</p>
<p>99 Blocks + the first that your transaction is considered on-chain means = 100 blocks that it is the method to say that somethings it is forever in Bitcoin time :)</p>
<p>A test that shows the coverage of this test case can <a href="https://github.com/ElementsProject/lightning/blob/c012a71decf65fd91e4179bc02b7b24cb379c54c/tests/test_closing.py#L82" rel="nofollow noreferrer">be found here</a></p>
<p>P.S: When your channel is in <code>ONCHAIN</code> status you can move all the funds around without waiting that this channel will disappear. You can see the transaction or transaction unreserved in your <code>listfunds</code> RPC command.</p>

CC BY-SA 4.0
2021-11-10T01:54:29.937Z
I think it's something else, because already more than 400 blocks since the channel closed.
If I try to withdraw all, I get 
   "message": "Could not afford all using all 0 available UTXOs: all short"
SMS
CC BY-SA 4.0
2021-11-10T02:49:50.920Z
Under listpeers can see that peer probably crashed, then restored did some kind of a unilateral channel crash and spent the onchain funds.
My node is doing its own unilateral close now and says it will wait another 200 blocks before that finishes.
Peer that caused it is still connected and can't be disconnected even with disconnect force set to true.
Seeems that might resolve properly, but after about 700 blocks total.
SMS
CC BY-SA 4.0
2021-11-10T11:34:39.127Z
I didn't good all the use case here, but if you make a unilateral close there is different rules that lightning network apply that required more time to wait if the peer will be online again to perform the close.
vincenzopalazzo
CC BY-SA 4.0
2021-11-09T05:29:40.623Z
2021-11-09T05:29:40.623Z
vincenzopalazzo
<p>What does &quot;ONCHAIN&quot; mean in c-lightning channel state?</p>
<p>I guess means the channel is closed, but how to move those sats, or make them available to use in another channel, and completely remove that old channel's information?</p>

<core-lightning>
ONCHAIN channel state in c-lightning
SMS
# ONCHAIN channel state in c-lightning

(Asked by: username_0 on 2021-11-09)

What does "ONCHAIN" mean in c-lightning channel state?

I guess means the channel is closed, but how to move those sats, or make them available to use in another channel, and completely remove that old channel's information?

**Tags:** core-lightning


---

## 1 answers

### Answer by username_1 on 2021-11-09. Score: 3 | Accepted answer

The meaning of the `ONCHAIN` status means that the channels it is closed, you are missing 99 more blocks before that your channels if forgetting by c-lightning.

99 Blocks + the first that your transaction is considered on-chain means = 100 blocks that it is the method to say that somethings it is forever in Bitcoin time :)

A test that shows the coverage of this test case can [be found here](https://github.com/ElementsProject/lightning/blob/c012a71decf65fd91e4179bc02b7b24cb379c54c/tests/test_closing.py#L82)

P.S: When your channel is in `ONCHAIN` status you can move all the funds around without waiting that this channel will disappear. You can see the transaction or transaction unreserved in your `listfunds` RPC command.

> **Comments:**
> **username_0**: I think it's something else, because already more than 400 blocks since the channel closed. If I try to withdraw all, I get     "message": "Could not afford all using all 0 available UTXOs: all short"  
> **username_0**: Under listpeers can see that peer probably crashed, then restored did some kind of a unilateral channel crash and spent the onchain funds. My node is doing its own unilateral close now and says it will wait another 200 blocks before that finishes. Peer that caused it is still connected and can't be disconnected even with disconnect force set to true. Seeems that might resolve properly, but after about 700 blocks total.  
> **username_1**: I didn't good all the use case here, but if you make a unilateral close there is different rules that lightning network apply that required more time to wait if the peer will be online again to perform the close.  

---

