From d05f74a8400be5a55e4ebaac095b725b94cfebc8 Mon Sep 17 00:00:00 2001 From: Andrew Sisley Date: Fri, 8 Nov 2024 12:45:59 -0500 Subject: [PATCH] PR FIXUP - Rename composite.Set to Append --- internal/core/crdt/composite.go | 2 +- internal/merkle/crdt/composite.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/core/crdt/composite.go b/internal/core/crdt/composite.go index 510d47d7e4..213c0828e0 100644 --- a/internal/core/crdt/composite.go +++ b/internal/core/crdt/composite.go @@ -101,7 +101,7 @@ func NewCompositeDAG( } // Set returns a new composite DAG delta CRDT with the given status. -func (c CompositeDAG) Set(status client.DocumentStatus) *CompositeDAGDelta { +func (c CompositeDAG) Append(status client.DocumentStatus) *CompositeDAGDelta { return &CompositeDAGDelta{ DocID: []byte(c.key.DocID), SchemaVersionID: c.schemaVersionKey.SchemaVersionID, diff --git a/internal/merkle/crdt/composite.go b/internal/merkle/crdt/composite.go index 862541bf8f..6bbbf029c5 100644 --- a/internal/merkle/crdt/composite.go +++ b/internal/merkle/crdt/composite.go @@ -61,12 +61,12 @@ func (m *MerkleCompositeDAG) Clock() *clock.MerkleClock { func (m *MerkleCompositeDAG) Delete( ctx context.Context, ) (cidlink.Link, []byte, error) { - delta := m.reg.Set(client.Deleted) + delta := m.reg.Append(client.Deleted) return m.clock.AddDelta(ctx, delta) } // Save the value of the composite CRDT to DAG. func (m *MerkleCompositeDAG) Save(ctx context.Context, links []coreblock.DAGLink) (cidlink.Link, []byte, error) { - delta := m.reg.Set(client.Active) + delta := m.reg.Append(client.Active) return m.clock.AddDelta(ctx, delta, links...) }