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:
Olaoluwa Osuntokun committed 2017-06-05 19:22:12 -07:00
1 parent 467ccfde41
commit aec8c8dc77
3 files changed
+126 -79

No files matched your search

+1
View File
@@ -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),