Merge pull request #3355 from wpaulino/is-graph-synced

discovery+rpc: expose graph synced status within GetInfo
This commit is contained in:
Olaoluwa Osuntokun
2019-08-12 18:22:45 -07:00
committed by GitHub
6 changed files with 636 additions and 508 deletions

View File

@@ -2038,6 +2038,8 @@ func (r *rpcServer) GetInfo(ctx context.Context,
uris[i] = fmt.Sprintf("%s@%s", encodedIDPub, addr.String())
}
isGraphSynced := r.server.authGossiper.SyncManager().IsGraphSynced()
// TODO(roasbeef): add synced height n stuff
return &lnrpc.GetInfoResponse{
IdentityPubkey: encodedIDPub,
@@ -2055,6 +2057,7 @@ func (r *rpcServer) GetInfo(ctx context.Context,
Color: routing.EncodeHexColor(nodeAnn.RGBColor),
BestHeaderTimestamp: int64(bestHeaderTimestamp),
Version: build.Version(),
SyncedToGraph: isGraphSynced,
}, nil
}