I would like to test this scenario on a testnet.

I funded a channel with one testnet node.

Assume that node suddenly vanishes and doesn't come back up for, say, another 4 weeks, or never.

What is supposed to happen? How am I supposed to detect and react to this?


Generally your lightning node will be able to tell which peers are online (in clightning with listpeers command)

If the other node is offline you can force close the channel by publishing your channel state.. Since the other node has signed your commitment tx as part of the protocol there is no need for it to be online or to help closing the channel.

  • I wonder how to test this without requiring two machines and two separate installs? I am using c-lightning. I can use listpeers but have no idea how would it look if one of the peers listed went dead. listpeers would still list the peer even if peer is not up? – Tony Mar 5 '19 at 0:40
  • Is there any channel where I can talk to the people, say connect to some testnet lightning peer and ask the person: hey can you exit your node for a few minutes so that I can see what I get when I do listpeers? – Tony Mar 5 '19 at 2:36
  • 1
    With c Lightning it is very easy to run several lightning nodes on one machine. Just start lightningd with different data-dir and address arguments. Each instance needs a different data directory and a different port. You don't even have to do it on testnet but you can also do it in regtest (simnet) as described here github.com/shesek/spark-wallet/blob/master/doc/… – Rene Pickhardt Mar 5 '19 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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