I think I have a general understanding of how the Lightning Network works. However, I was having a little difficulty in understanding what happens when a node in the middle of a "path" suddenly goes dormant, or offline for a long time. To clarify my question, consider the following example:

  1. A wants to make a payment of 1 BTC to D.
  2. A finds a path from A --> B --> C --> D.
  3. D generates an R and sends H = hash(R) to A
  4. A creates HTLC of 1.002 BTC with B.
  5. B creates HTLC of 1.001 BTC with C.
  6. C creates HTLC of 1 BTC with D.
  7. D unlocks HTLC, receives 1 BTC, and then tells R to C.

However, what if C is suddenly offline meaning C won't be there to receive R from D and thus stops the flow of R back through the path. I would assume that the HTLC's between A and B and B and C run out and so A and B are refunded.

So, would C lose out? Would A have just made a "free" transaction? I assume this is a fast process, but is it likely such an event occurs where a middle node in an LN transaction just goes down for a long while?

2 Answers 2


Unless I have misunderstood the LN, the R value gets disclosed publicly when D accepts the payment, allowing the entire backchain to claim their parts.

  • 2
    Yes, I am aware of that, but say D claims the payment and discloses R and right before that C disappears (and does not come back for the duration of the HTLC). Thus, B can claim funds twice. Is this correct and/or realistic? Or is the whole process so fast that this scenario is unlikely?
    – crypto_rob
    Commented Oct 27, 2017 at 16:13
  • yes, if C disappears after having sent value out, and before D claims the value - and stays gone until after the timelock expires, then B can claim the value from A and reclaim the value from B. Commented Oct 27, 2017 at 18:26
  • Alright, that's exactly how I thought it would work. How fast does this transaction stream happen? How fast would C have to disconnect after relaying the transaction for this to happen? I assume ms or even less.
    – crypto_rob
    Commented Oct 27, 2017 at 18:56
  • depends mostly on the network latencies of involved parties. likely to be sub-second in most cases, but could go up to a few seconds in less than ideal conditions. Commented Oct 27, 2017 at 19:36
  • Also, I guess that if, say B tried to force C to disconnect via some sort of attack in order to get double pay, C could commit the commitment tx and thus "pull out" of the channel. Sorry, sort of digressing into more of a discussion than a Q/A.
    – crypto_rob
    Commented Oct 27, 2017 at 19:43

If the transaction cannot resolve before the CLTV value of the HTLC runs out the peers will be refunded (the pending HTLCs cancelled) and the transaction will be cancelled.

If C is not there to receive R funds will not move so there is no need for force closures, but the funds will be stuck on the online channels as well for that period of time. The online channels will be able to propagate payments in the meantime given there is more liquidity available and the number of pending HTLC-s is below the set limit.

See the situation where C would be online to receive R and go offline before propagating to B discussed in: What happens if R is not revealed by one of Lightning Network nodes? (Payment cancelation)

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.