-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lnd): attempt openchannel when connect fails
We currently attempt to connect to a peer's lnd node using their advertised listening addresses before opening a channel over lnd. If the connection attempt fails for any reason other than that we are already connected to the peer, then we fail the open channel attempt. However, this prematurely fails cases where a peer does not advertise listening addresses, such that connection attempts won't even be made and the `OpenChannel` call will fail right away, but is already connected to us. This could happen if a peer had previously connected to us. Instead, we first attempt to connect to the peer's lnd node but then proceed to attempt to open a channel regardless of where we were able to connect or not. If we aren't connected to that peer, the lnd `OpenChannel` call will fail right away and the end result will be the same. On occasions where we are already connected, the call will succeed. This also performs some minor refactoring to rename `lndUris` to `uris` so that it is more generic for supporting future swap clients that also advertise listening addresses for nodes.
- Loading branch information
Showing
7 changed files
with
20 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters