1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-11 02:13:49 +09:00

Remove old inmemory list storage

This commit is contained in:
mcrakhman 2024-12-02 21:23:40 +01:00
parent d8edabf9cd
commit cef4f8e5b4
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
4 changed files with 8 additions and 11 deletions

View file

@ -9,7 +9,6 @@ import (
"github.com/anyproto/any-sync/app"
"github.com/anyproto/any-sync/commonspace/object/accountdata"
"github.com/anyproto/any-sync/commonspace/object/acl/list"
"github.com/anyproto/any-sync/commonspace/object/acl/liststorage"
"github.com/anyproto/any-sync/consensus/consensusproto"
"github.com/anyproto/any-sync/node/nodeclient"
)
@ -56,7 +55,7 @@ func (c *aclJoiningClient) getAcl(ctx context.Context, spaceId string) (l list.A
err = fmt.Errorf("acl not found")
return
}
storage, err := liststorage.NewInMemoryAclListStorage(res[0].Id, res)
storage, err := list.NewInMemoryStorage(res[0].Id, res)
if err != nil {
return
}

View file

@ -14,7 +14,6 @@ import (
"github.com/anyproto/any-sync/commonspace/acl/aclclient"
"github.com/anyproto/any-sync/commonspace/object/accountdata"
"github.com/anyproto/any-sync/commonspace/object/acl/list"
"github.com/anyproto/any-sync/commonspace/object/acl/liststorage"
"github.com/anyproto/any-sync/util/periodicsync"
)
@ -79,7 +78,7 @@ func (a *aclWaiter) loop(ctx context.Context) error {
if len(res) == 0 {
return fmt.Errorf("acl not found")
}
storage, err := liststorage.NewInMemoryAclListStorage(res[0].Id, res)
storage, err := list.NewInMemoryStorage(res[0].Id, res)
if err != nil {
return err
}

View file

@ -20,7 +20,6 @@ import (
"github.com/anyproto/any-sync/commonspace/object/accountdata"
"github.com/anyproto/any-sync/commonspace/object/acl/list"
"github.com/anyproto/any-sync/commonspace/object/acl/liststorage"
"github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto"
"github.com/anyproto/any-sync/commonspace/object/tree/treestorage"
)
@ -466,7 +465,7 @@ func TestObjectTree(t *testing.T) {
// copying old version of storage
prevAclRecs, err := bAccount.Acl.RecordsAfter(ctx, "")
require.NoError(t, err)
storage, err := liststorage.NewInMemoryAclListStorage(prevAclRecs[0].Id, prevAclRecs)
storage, err := list.NewInMemoryStorage(prevAclRecs[0].Id, prevAclRecs)
require.NoError(t, err)
acl, err := list.BuildAclListWithIdentity(bAccount.Keys, storage, list.NoOpAcceptorVerifier{})
require.NoError(t, err)