Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a PaymentForwardingFailed Event #1392

Closed
TheBlueMatt opened this issue Mar 27, 2022 · 4 comments
Closed

Expose a PaymentForwardingFailed Event #1392

TheBlueMatt opened this issue Mar 27, 2022 · 4 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@TheBlueMatt
Copy link
Collaborator

When we try to forward a payment but it fails, users may want to know about this, as it may imply something about rebalancing channels or at least may be something users want to collect stats about. As discussed in #1391 I don't think we want to expose payment hash here, but source + sink channels+nodes and whether we forwarded at all or failed without being able to forward would be useful info for users.

@TheBlueMatt TheBlueMatt added the good first issue Good for newcomers label Mar 27, 2022
@TheBlueMatt TheBlueMatt added this to the 0.1.1 milestone Mar 27, 2022
@jurvis
Copy link
Contributor

jurvis commented Mar 30, 2022

I can take a stab at this.

Just a couple of questions:

  1. Is the sink node and channel referring to the node we are forwarding to that failed and the outbound channel respectively?
  2. Same question as above, but for source node/channel
  3. Will adding an else case here suffice in capturing where forwarding logic can fail? (still new to code base, just making sure I'm understand what is happening correctly)

@TheBlueMatt
Copy link
Collaborator Author

Sorry for the delay here.

Sink + source?

Yes, correct, I was using it to refer to the forwardee and HTLC source.

Will adding an else case here suffice in capturing where forwarding logic can fail? (still new to code base, just making sure I'm understand what is happening correctly)

Ah, no, sorry, I believe that branch is for if the claim is duplicative of a previous claim (which can happen sometimes). For the forwarding-failed case you probably want to look at fail_htlc_backwards_internal.

@valentinewallace
Copy link
Contributor

I think this was closed by #1403

@TheBlueMatt
Copy link
Collaborator Author

I believe that only applies in cases where we forwarded the HTLC and then have it fail, if we receive an HTLC and decide we can't forward it without forwarding at all, we don't generate the event. Will open a new issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants