-
Notifications
You must be signed in to change notification settings - Fork 103
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
Conversation
Remove the code for creating remote connections to loop, faraday and pool subservers from the rpcProxy. This is now handled by the subserver manager.
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.
These changes make it so much cleaner. Thank you @ellemouton
Note: i did not test the integrate/remote combination that panic in #537
Ensure that all of Lit's subserver loggers have been registered _before_ the config is validated. This will allow users to use the `--lnd.debuglevel` flag to set Lit specific subserever logger levels.
Thanks @positiveblue!
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.
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`.
one more commit with the same nature |
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.
Very nice, LGTM 🎉
faradayPerms string = "faraday" | ||
litPerms string = "lit" | ||
lndPerms string = "lnd" | ||
litPerms string = "lit" |
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.
Nice! A little bit less duplication 🎉
This PR is the first couple of commits of #537 without the disabling logic.