diff --git a/commonspace/headsync/headsync.go b/commonspace/headsync/headsync.go index c118a751..0030ac92 100644 --- a/commonspace/headsync/headsync.go +++ b/commonspace/headsync/headsync.go @@ -145,6 +145,9 @@ func (h *headSync) Close(ctx context.Context) (err error) { func (h *headSync) fillDiff(ctx context.Context) error { var els = make([]ldiff.Element, 0, 100) err := h.storage.HeadStorage().IterateEntries(ctx, headstorage.IterOpts{}, func(entry headstorage.HeadsEntry) (bool, error) { + if entry.IsDerived && entry.Heads[0] == entry.Id { + return true, nil + } els = append(els, ldiff.Element{ Id: entry.Id, Head: concatStrings(entry.Heads), diff --git a/commonspace/headsync/headupdater.go b/commonspace/headsync/headupdater.go index 7d9d092c..b242e358 100644 --- a/commonspace/headsync/headupdater.go +++ b/commonspace/headsync/headupdater.go @@ -15,7 +15,8 @@ type headUpdater struct { func newHeadUpdater(update func(update headstorage.HeadsUpdate)) *headUpdater { return &headUpdater{ - batcher: mb.New[headstorage.HeadsUpdate](0), + batcher: mb.New[headstorage.HeadsUpdate](0), + updateFunc: update, } }