-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
routing+htlcswitch: fix stuck inflight payments #9150
base: master
Are you sure you want to change the base?
Changes from 1 commit
f1d39dd
847d3b1
8c87d00
41d66e8
0a4ae30
368b652
d6477ec
6b41c79
e27e209
22c1b0b
c74afbe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,6 +274,16 @@ lifecycle: | |
// We found a route to try, create a new HTLC attempt to try. | ||
attempt, err := p.registerAttempt(rt, ps.RemainingAmt) | ||
if err != nil { | ||
// If the error is due to we cannot register another | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should in neither case when receiving an error also in requestRoute just exist the payment without marking it as failed not collecting all results. So what we should do is, every error that occurs should fail the payment in the paymentDB and wait for all collectors to resolve. |
||
// HTLC, we will skip this iteration and continue to | ||
// the next one in case there are inflight HTLCs. | ||
// | ||
// TODO(yy): remove this check once we have a finer | ||
// control over errors returned from the switch. | ||
if errors.Is(err, channeldb.ErrRegisterAttempt) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we don't need this case, because when should this ever happen we now always have one single send and process result thread, so we would already know probably in the |
||
continue lifecycle | ||
} | ||
|
||
return exitWithErr(err) | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have the if else here if both do the same thing ?