1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Add legacy hash key to state storage

This commit is contained in:
Mikhail Rakhmanov 2025-04-23 18:11:35 +02:00
parent 0463141769
commit 7202d8f0b8
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B

View file

@ -11,6 +11,7 @@ import (
type State struct {
OldHash string
NewHash string
LegacyHash string
AclId string
SettingsId string
SpaceId string
@ -33,6 +34,7 @@ const (
idKey = "id"
oldHashKey = "oh"
newHashKey = "nh"
legacyHashKey = "h"
headerKey = "e"
aclIdKey = "a"
settingsIdKey = "s"
@ -151,6 +153,7 @@ func (s *stateStorage) stateFromDoc(doc anystore.Doc) State {
AclId: doc.Value().GetString(aclIdKey),
OldHash: doc.Value().GetString(newHashKey),
NewHash: doc.Value().GetString(oldHashKey),
LegacyHash: doc.Value().GetString(legacyHashKey),
SpaceHeader: doc.Value().GetBytes(headerKey),
}
}