lnd: log sync status in GetInfo
This is added to fix a flake found in starting the node.
This commit is contained in:
1 file changed
+11
@@ -9056,6 +9056,9 @@ func (r *rpcServer) getChainSyncInfo() (*chainSyncInfo, error) {
|
|||||||
|
|
||||||
// Exit early if the wallet is not synced.
|
// Exit early if the wallet is not synced.
|
||||||
if !isSynced {
|
if !isSynced {
|
||||||
|
rpcsLog.Debugf("Wallet is not synced to height %v yet",
|
||||||
|
bestHeight)
|
||||||
|
|
||||||
return info, nil
|
return info, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9074,6 +9077,9 @@ func (r *rpcServer) getChainSyncInfo() (*chainSyncInfo, error) {
|
|||||||
|
|
||||||
// Exit early if the channel graph is not synced.
|
// Exit early if the channel graph is not synced.
|
||||||
if !isSynced {
|
if !isSynced {
|
||||||
|
rpcsLog.Debugf("Graph is not synced to height %v yet",
|
||||||
|
bestHeight)
|
||||||
|
|
||||||
return info, nil
|
return info, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9084,5 +9090,10 @@ func (r *rpcServer) getChainSyncInfo() (*chainSyncInfo, error) {
|
|||||||
// Overwrite isSynced and return.
|
// Overwrite isSynced and return.
|
||||||
info.isSynced = height == bestHeight
|
info.isSynced = height == bestHeight
|
||||||
|
|
||||||
|
if !info.isSynced {
|
||||||
|
rpcsLog.Debugf("Blockbeat is not synced to height %v yet",
|
||||||
|
bestHeight)
|
||||||
|
}
|
||||||
|
|
||||||
return info, nil
|
return info, nil
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user