Skip to content

multi: modularise subserver handling #539

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

Merged
merged 13 commits into from
May 3, 2023

Conversation

ellemouton
Copy link
Member

This PR is the first couple of commits of #537 without the disabling logic.

ellemouton added 4 commits May 2, 2023 08:33
Remove the code for creating remote connections to loop, faraday and
pool subservers from the rpcProxy. This is now handled by the subserver
manager.
Copy link
Contributor

@positiveblue positiveblue left a comment

Choose a reason for hiding this comment

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

These changes make it so much cleaner. Thank you @ellemouton

Note: i did not test the integrate/remote combination that panic in #537

@ellemouton
Copy link
Member Author

Thanks @positiveblue!

Note: i did not test the integrate/remote combination that panic in #537

No worries - that panic is only (it seems) related to the situation where one sub-server is disabled. Which is not the case here.

Due to the rpcProxy being started early now, it could be the case that a
call is made to `GetRemoteConn` before the remote connection has
actually been set up. This commit catches this case so that an error can
be returned and a panic avoided.
@ellemouton
Copy link
Member Author

note: i have added one more commit on the end which I think will fix the panic that was noted by Jamal 🤞

In the rpcProxy `makeDirector` method, we need to check if the rpcProxy
has started before making use of the `lndConn`.
@ellemouton
Copy link
Member Author

one more commit with the same nature

Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Very nice, LGTM 🎉

faradayPerms string = "faraday"
litPerms string = "lit"
lndPerms string = "lnd"
litPerms string = "lit"
Copy link
Member

Choose a reason for hiding this comment

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

Nice! A little bit less duplication 🎉

@ellemouton ellemouton merged commit 8eb5372 into lightninglabs:master May 3, 2023
@ellemouton ellemouton deleted the subserverSetup branch May 3, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants