lnd: decouple rpcServer from server, wait till chain synced before starting server
This commit overhauls the way that lnd is created with the goal of ensuring the chain backends are fully synced up before the daemon itself starts. The rpcServer has been slightly decoupled from the server itself s.t we can start the rpcServer independently of the server. This is required as we’ll now wait (unless we’re in simnet mode) for the chain to fully sync up before we even _start_ any of the server’s goroutines.
This commit is contained in:
3 files changed
+126
-79
No files matched your search
@@ -781,6 +781,7 @@ func (r *rpcServer) GetInfo(ctx context.Context,
|
||||
for i, chain := range registeredChains.ActiveChains() {
|
||||
activeChains[i] = chain.String()
|
||||
}
|
||||
|
||||
// TODO(roasbeef): add synced height n stuff
|
||||
return &lnrpc.GetInfoResponse{
|
||||
IdentityPubkey: hex.EncodeToString(idPub),
|
||||
|
||||
Reference in new issue
Block a user