Description
Once we receive ChannelReady event from LDK we iterate over all of the intercepted HTLCs we are holding, remove the fee, and then attempt to forward each one individually.
It's possible for forwards to fail but we will not receive any kind of signal that this happened. As an LSP we would want to know how much fee is still owed for the channel we just opened. We could then continue to take fee from future HTLCs until we have collected what we were owed.
We might also want to close the channel should the opening payment fail for whatever reason.
@tnull was going to look into how this could work with LDK as it doesn't appear to be possible to extract this information from LDK as it stands. We might be able to use HTLCHandlingFailed
event in combination with next hop and payment_hash information. This still wouldn't help us identify which parts of a MPP failed, we would need a way to tie the InterceptId to the failed HTLC event.