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

fix(lnd): relax unhandled openchannel timeout #1463

Merged
merged 1 commit into from
Apr 9, 2020
Merged

Conversation

sangaman
Copy link
Collaborator

@sangaman sangaman commented Apr 9, 2020

This removes the hard timeout placed on each attempt to connect to a peer's lnd node when attempting to open a channel with that peer. This timeout was causing xud to crash because it threw an error that was not being handled in the encapsulating catch block, which did not catch the error because it was thrown from a callback.

Rather than attempt to correct the asynchronous exception handling, this lifts the timeout limit set within xud and instead will wait on each connect attempt until it succeeds, times out, or fails according to the logic within lnd.

Fixes #1405.

@sangaman sangaman added bug Something isn't working lightning Lightning network & lnd integration labels Apr 9, 2020
@sangaman sangaman requested review from a user and michael1011 April 9, 2020 07:17
@sangaman sangaman self-assigned this Apr 9, 2020
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 of the related test is failing.

@kilrau kilrau self-requested a review April 9, 2020 10:30
Copy link
Contributor

@kilrau kilrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, we'd additionally want to expose lnd's --push_amt flag via grpc & xucli

@sangaman
Copy link
Collaborator Author

sangaman commented Apr 9, 2020

Fixing the test case now. @kilrau I'll open a separate issue for push_amt and implement it in a separate PR?

This removes the hard timeout placed on each attempt to connect to a
peer's lnd node when attempting to open a channel with that peer. This
timeout was causing xud to crash because it threw an error that was not
being handled in the encapsulating catch block, which did not catch the
error because it was thrown from a callback.

Rather than attempt to correct the asynchronous exception handling,
this lifts the timeout limit set within xud and instead will wait on
each connect attempt until it succeeds, times out, or fails according to
the logic within lnd.

Fixes #1405.
@ghost
Copy link

ghost commented Apr 9, 2020

I'll open a separate issue for push_amt and implement it in a separate PR?

It makes sense to do in a separate PR since it's not related to fixing the issue described in OP.

@sangaman sangaman requested review from a user, michael1011 and kilrau and removed request for michael1011 April 9, 2020 13:48
@kilrau
Copy link
Contributor

kilrau commented Apr 9, 2020

Fixing the test case now. @kilrau I'll open a separate issue for push_amt and implement it in a separate PR?

Yep, sounds good!

@sangaman sangaman merged commit d19c370 into master Apr 9, 2020
@sangaman sangaman deleted the fix/open-channel branch April 9, 2020 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lightning Lightning network & lnd integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xud crashed on openchannel command
3 participants