discovery/sync_manager: remove unneeded markGraphSyncing

AFAICT it's not possible to flip back from bein synced_to_chain, so we
remove the underlying call that could reflect this. The method is moved
into the test file since it's still used to test correctness of other
portions of the flow.
This commit is contained in:
Conner Fromknecht
2021-01-29 00:08:44 -08:00
parent e42301dee2
commit b1fee734ec
2 changed files with 7 additions and 7 deletions

View File

@@ -316,7 +316,6 @@ func (m *SyncManager) syncerHandler() {
if !attemptHistoricalSync {
continue
}
m.markGraphSyncing()
log.Debugf("Attempting initial historical sync with "+
"GossipSyncer(%x)", s.cfg.peerPub)
@@ -751,12 +750,6 @@ func (m *SyncManager) markGraphSynced() {
atomic.StoreInt32(&m.initialHistoricalSyncCompleted, 1)
}
// markGraphSyncing allows us to report that the initial historical sync is
// still undergoing.
func (m *SyncManager) markGraphSyncing() {
atomic.StoreInt32(&m.initialHistoricalSyncCompleted, 0)
}
// IsGraphSynced determines whether we've completed our initial historical sync.
// The initial historical sync is done to ensure we've ingested as much of the
// public graph as possible.