From 7e6825fbaf2b5b28a609b31fce4799e53ded0770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 12 Jan 2021 14:52:50 +0100 Subject: [PATCH] Merge pull request #4192 from filecoin-project/schomatis/sync/remove-self-bypass fix(sync): remove checks bypass when we submit the block --- chain/sync.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/chain/sync.go b/chain/sync.go index 74f7e2fe566..eed35ee371f 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -249,18 +249,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 {