mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 01:36:24 +01:00
Merge pull request #3400 from wpaulino/lncli-getinfo-synced-to-graph
cmd/lncli: properly set synced_to_graph for getinfo command
This commit is contained in:
commit
80c6759140
2 changed files with 6 additions and 3 deletions
|
@ -1879,6 +1879,7 @@ func getInfo(ctx *cli.Context) error {
|
|||
BlockHash string `json:"block_hash"`
|
||||
BestHeaderTimestamp int64 `json:"best_header_timestamp"`
|
||||
SyncedToChain bool `json:"synced_to_chain"`
|
||||
SyncedToGraph bool `json:"synced_to_graph"`
|
||||
Testnet bool `json:"testnet"`
|
||||
Chains []chain `json:"chains"`
|
||||
Uris []string `json:"uris"`
|
||||
|
@ -1895,6 +1896,7 @@ func getInfo(ctx *cli.Context) error {
|
|||
BlockHash: resp.BlockHash,
|
||||
BestHeaderTimestamp: resp.BestHeaderTimestamp,
|
||||
SyncedToChain: resp.SyncedToChain,
|
||||
SyncedToGraph: resp.SyncedToGraph,
|
||||
Testnet: resp.Testnet,
|
||||
Chains: chains,
|
||||
Uris: resp.Uris,
|
||||
|
|
|
@ -383,9 +383,10 @@ func (m *SyncManager) syncerHandler() {
|
|||
case <-m.cfg.HistoricalSyncTicker.Ticks():
|
||||
s := m.forceHistoricalSync()
|
||||
|
||||
// If we've already performed our initial historical
|
||||
// sync, then we have nothing left to do.
|
||||
if m.IsGraphSynced() {
|
||||
// If we don't have a syncer available or we've already
|
||||
// performed our initial historical sync, then we have
|
||||
// nothing left to do.
|
||||
if s == nil || m.IsGraphSynced() {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue