Merge pull request #4192 from filecoin-project/schomatis/sync/remove-self-bypass

fix(sync): remove checks bypass when we submit the block
This commit is contained in:
Łukasz Magiera 2021-01-12 14:52:50 +01:00 committed by GitHub
commit b0bb36909b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,18 +250,6 @@ func (syncer *Syncer) InformNewHead(from peer.ID, fts *store.FullTipSet) bool {
syncer.incoming.Pub(fts.TipSet().Blocks(), LocalIncoming)
if from == syncer.self {
// TODO: this is kindof a hack...
log.Debug("got block from ourselves")
if err := syncer.Sync(ctx, fts.TipSet()); err != nil {
log.Errorf("failed to sync our own block %s: %+v", fts.TipSet().Cids(), err)
return false
}
return true
}
// TODO: IMPORTANT(GARBAGE) this needs to be put in the 'temporary' side of
// the blockstore
if err := syncer.store.PersistBlockHeaders(fts.TipSet().Blocks()...); err != nil {