mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-11 03:22:58 +02:00
Merge pull request #3355 from wpaulino/is-graph-synced
discovery+rpc: expose graph synced status within GetInfo
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user