You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the upcoming actions migration, we need fetch LNDs macaroons prior to
initializing the stores, as the macaroons will be required during the
migration.
This requires that we setup the connection to LND before we initialize
the stores, as we can only fetch the macaroons after the LND connection
is established.
In preparation of doing so, we cannot reference the stores when
initializing/creating the accounts RPC server object, as we do so prior
to setting up the LND connection.
This commit therefore refactors the accounts RPC server so that we
separate the initializing from the starting of the RPC server, and only
require the store reference during the actual startup of the RPC server.
Note that while this commit adds an `active atomic int32` to the RPC
server which must be set toggled before the server will process
requests, the RPC proxy and status manager will ensure that no requests
get sent to the RPC prior to LiT's subserver being set to running. This
is added to ensure that we dont introduce any nil pointer panics in
future updates though, as the RPC server would panic in requests were
actually processed prior to it having the dependencies injected during
the `Start` function.
Also note that we still keep the init of the accounts RPC server
reference prior to setting up the LND connection, as not doing so would
require that we'd refactor the registering of `GrpcSubserver`s in a more
complex and in a less elegant way.
0 commit comments