fix(db-sync): stabilize checksum parity for e2ee graph init

This commit is contained in:
Tienson Qin
2026-03-25 12:54:54 +08:00
parent d601133958
commit ba64df8c08
7 changed files with 174 additions and 69 deletions

View File

@@ -49,8 +49,7 @@
(defn update-local-sync-checksum!
[repo tx-report]
(when (and (worker-state/get-client-ops-conn repo)
(not (sync-crypt/graph-e2ee? repo)))
(when (worker-state/get-client-ops-conn repo)
(client-op/update-local-checksum
repo
(sync-checksum/update-checksum (client-op/get-local-checksum repo) tx-report))))

View File

@@ -120,8 +120,7 @@
(defn- verify-sync-checksum!
[repo client local-tx remote-tx remote-checksum context]
(when (and (not (sync-crypt/graph-e2ee? repo))
(string? remote-checksum)
(when (and (string? remote-checksum)
(checksum-compare-ready? repo client local-tx remote-tx))
(let [local-checksum (local-sync-checksum repo)]
(when-not (= local-checksum remote-checksum)