remove debug prints

This commit is contained in:
whyrusleeping 2019-12-07 19:16:17 +01:00
parent 7363fa2e8e
commit 80595e4dd5

View File

@ -271,7 +271,6 @@ func (sm *SyncManager) syncScheduler() {
} }
func (sm *SyncManager) scheduleIncoming(ts *types.TipSet) { func (sm *SyncManager) scheduleIncoming(ts *types.TipSet) {
log.Warn("Incoming tipset! ", ts.Cids(), ts.Height())
var relatedToActiveSync bool var relatedToActiveSync bool
for _, acts := range sm.activeSyncs { for _, acts := range sm.activeSyncs {
if ts.Equals(acts) { if ts.Equals(acts) {
@ -280,20 +279,17 @@ func (sm *SyncManager) scheduleIncoming(ts *types.TipSet) {
if types.CidArrsEqual(ts.Parents(), acts.Cids()) || types.CidArrsEqual(ts.Parents(), acts.Parents()) { if types.CidArrsEqual(ts.Parents(), acts.Cids()) || types.CidArrsEqual(ts.Parents(), acts.Parents()) {
// sync this next, after that sync process finishes // sync this next, after that sync process finishes
log.Warn("mark 1")
relatedToActiveSync = true relatedToActiveSync = true
} }
} }
if !relatedToActiveSync && sm.activeSyncTips.RelatedToAny(ts) { if !relatedToActiveSync && sm.activeSyncTips.RelatedToAny(ts) {
log.Warn("mark 2")
relatedToActiveSync = true relatedToActiveSync = true
} }
// if this is related to an active sync process, immediately bucket it // if this is related to an active sync process, immediately bucket it
// we don't want to start a parallel sync process that duplicates work // we don't want to start a parallel sync process that duplicates work
if relatedToActiveSync { if relatedToActiveSync {
log.Warn("related to active sync")
sm.activeSyncTips.Insert(ts) sm.activeSyncTips.Insert(ts)
return return
} }
@ -311,7 +307,6 @@ func (sm *SyncManager) scheduleIncoming(ts *types.TipSet) {
} }
func (sm *SyncManager) scheduleProcessResult(res *syncResult) { func (sm *SyncManager) scheduleProcessResult(res *syncResult) {
log.Warn("sync result! ", res.ts.Key())
delete(sm.activeSyncs, res.ts.Key()) delete(sm.activeSyncs, res.ts.Key())
relbucket := sm.activeSyncTips.PopRelated(res.ts) relbucket := sm.activeSyncTips.PopRelated(res.ts)
if relbucket != nil { if relbucket != nil {
@ -328,8 +323,6 @@ func (sm *SyncManager) scheduleProcessResult(res *syncResult) {
// have come in since. The question is, should we try to // have come in since. The question is, should we try to
// sync these? or just drop them? // sync these? or just drop them?
} }
} else {
log.Warn("no related bucket!")
} }
} }