package syncer import ( "context" "time" "github.com/filecoin-project/lotus/chain/types" "github.com/ipfs/go-cid" ) func (s *Syncer) subBlocks(ctx context.Context) { sub, err := s.node.SyncIncomingBlocks(ctx) if err != nil { log.Error(err) return } for bh := range sub { err := s.storeHeaders(map[cid.Cid]*types.BlockHeader{ bh.Cid(): bh, }, false, time.Now()) if err != nil { log.Errorf("%+v", err) } } }