Skip to content

Commit

Permalink
Merge pull request filecoin-project#4192 from filecoin-project/schoma…
Browse files Browse the repository at this point in the history
…tis/sync/remove-self-bypass

fix(sync): remove checks bypass when we submit the block
  • Loading branch information
magik6k authored and bibibong committed Jan 13, 2021
1 parent 4a0198c commit 7e6825f
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions chain/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7e6825f

Please sign in to comment.