From ad74e7e618907327d578d85eba78703bce9b49f9 Mon Sep 17 00:00:00 2001 From: Ben Brooks Date: Fri, 24 Nov 2023 18:01:36 +0000 Subject: [PATCH] CBG-3253: Add CBMobileReplicationV4 (#6583) * Add CBMobileReplicationV4 const * Ensure TestAllowedAttachments works with v4 replicator version --- db/attachment_test.go | 2 ++ db/blip_subprotocol.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/db/attachment_test.go b/db/attachment_test.go index 5faac5af54..f68a659a74 100644 --- a/db/attachment_test.go +++ b/db/attachment_test.go @@ -1329,6 +1329,8 @@ func TestAllowedAttachments(t *testing.T) { {"TestAllowedAttachmentsCBMobile2AttVer2", CBMobileReplicationV2, AttVersion2}, {"TestAllowedAttachmentsCBMobile3AttVer1", CBMobileReplicationV3, AttVersion1}, {"TestAllowedAttachmentsCBMobile3AttVer2", CBMobileReplicationV3, AttVersion2}, + {"TestAllowedAttachmentsCBMobile4AttVer1", CBMobileReplicationV4, AttVersion1}, + {"TestAllowedAttachmentsCBMobile4AttVer2", CBMobileReplicationV4, AttVersion2}, } isAllowedAttachment := func(ctx *BlipSyncContext, key string) bool { diff --git a/db/blip_subprotocol.go b/db/blip_subprotocol.go index 4e040a1e9e..cce6ba8ce8 100644 --- a/db/blip_subprotocol.go +++ b/db/blip_subprotocol.go @@ -21,6 +21,8 @@ const ( CBMobileReplicationV2 CBMobileSubprotocolVersion = iota + 2 // CBMobileReplicationV3 minor changes to support revocation and ISGR CBMobileReplicationV3 + // Version Vectors/HLV + CBMobileReplicationV4 // _nextCBMobileSubprotocolVersions reserved for maxCBMobileSubprotocolVersion _nextCBMobileSubprotocolVersions