clean up chain sync a little
This commit is contained in:
parent
251ff41134
commit
89fd13de9d
@ -127,9 +127,7 @@ func (syncer *Syncer) InformNewHead(from peer.ID, fts *store.FullTipSet) {
|
||||
}
|
||||
|
||||
syncer.Bsync.AddPeer(from)
|
||||
syncer.syncmgr.SetPeerHead(ctx, from, fts.TipSet())
|
||||
|
||||
/*
|
||||
bestPweight := syncer.store.GetHeaviestTipSet().Blocks()[0].ParentWeight
|
||||
targetWeight := fts.TipSet().Blocks()[0].ParentWeight
|
||||
if targetWeight.LessThan(bestPweight) {
|
||||
@ -137,12 +135,7 @@ func (syncer *Syncer) InformNewHead(from peer.ID, fts *store.FullTipSet) {
|
||||
return
|
||||
}
|
||||
|
||||
go func() {
|
||||
if err := syncer.Sync(ctx, fts.TipSet()); err != nil {
|
||||
log.Errorf("sync error (curW=%s, targetW=%s): %+v", bestPweight, targetWeight, err)
|
||||
}
|
||||
}()
|
||||
*/
|
||||
syncer.syncmgr.SetPeerHead(ctx, from, fts.TipSet())
|
||||
}
|
||||
|
||||
func (syncer *Syncer) ValidateMsgMeta(fblk *types.FullBlock) error {
|
||||
|
Loading…
Reference in New Issue
Block a user