Remove the responsibility of creating an LND connection from the
rpcProxy and instead let the main LightningTerminal struct handle it.
All the lnd-connection specific functions are also moved into their own
file.
Add a `started` variable to the rpcProxy that is used to indicate if the
proxy is ready to handle requests. This is because currently the
webserver is dependent on the rpcProxy to start and we want to be able
to start the webserver without being dependent on the rpcProxy so that
it can be used to handle status requests in a future commit. So with
this commit, we can now saftely start the webserver earlier on and then
if requests come through for the rpcProxy, an error will be displayed to
the user.
Even though the content of the app/build directory should be ignored by
git, we need it to exist in order for the Golang embedded file system
compilation to succeed on an empty project. This is required to fix
compilation issues when lightning-terminal is used as a module
dependency in another project, where the frontend build process can't be
triggered.
We run into an issue with the linter that couldn't be fixed yet:
level=error msg="Running error: 1 error occurred:\n\t* can't run linter goanalysis_metalinter: buildir: failed to load package loopdb: could not load export data: no export data for \"github.com/lightninglabs/loop/loopdb\"\n\n"
We disable the linter for now until we find out what the problem is.
Add new `WithoutLitArg` and `WithLitArg` functional options that can be
passed to `GenArgs` when a node is being restarted. This makes it easy
to change the arguments of a node on restart.
Add a new `disableui` config option. If this option is set then the user
no longer needs to set the `uipassword` config option. This also means
that the user will no longer be able to interact with the local UI.
Let the itest framework make use of the new StopDaemon method. When
instructed to Stop the node, if it is running in remote mode then only
the litd node itself should be stopped and not the remote LND node.
In this commit, a new Proxy service is added with a StopDaemon method.
This method can be used to stop the Litd service. This will be useful in
remote-mode itests where we want to restart Litd without also restarting
LND. It also provides a nice way of shutting down Litd in remote-mode.
A GetInfo method is also added to the service which for now just returns
the Litd version. The reason for adding this method now is so that
access to the new Proxy service can be tested in the itests withouth
actually shutting down Litd.