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?

1 Answer 1


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

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.

  • 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
    Commented Nov 10, 2021 at 1:54
  • 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
    Commented Nov 10, 2021 at 2:49
  • 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. Commented Nov 10, 2021 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.