From 97c07fb6ec8b7ae888fe5289db1f2884524e5329 Mon Sep 17 00:00:00 2001 From: David Buchanan Date: Wed, 4 Dec 2024 07:37:36 +0000 Subject: [PATCH] tentative fix for #17 --- src/millipds/repo_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/millipds/repo_ops.py b/src/millipds/repo_ops.py index 5c4075b..9af897c 100644 --- a/src/millipds/repo_ops.py +++ b/src/millipds/repo_ops.py @@ -257,7 +257,7 @@ def apply_writes(db: Database, repo: str, writes: List["WriteOp"], swap_commit: car = io.BytesIO() cw = util.CarWriter(car, commit_cid) cw.write_block(commit_cid, commit_bytes) - for mst_cid in created: + for mst_cid in created | {next_commit_root}: # unconditionally include the new root, to enable context-free deletion proofs if the top of the tree has been "cut off" without modifying the rest of the tree. see https://github.com/bluesky-social/atproto/pull/3033#issuecomment-2516402420 cw.write_block(mst_cid, bs.get_block(bytes(mst_cid))) for record_cid in new_record_cids: cw.write_block(record_cid, record_cbors[record_cid])