Skip to content

Commit

Permalink
fix record_diff prior/later mixup
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBuchanan314 committed Nov 17, 2024
1 parent ff022fc commit b4ef2e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/atmst/mst/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def record_diff(ns: NodeStore, created: set[CID], deleted: set[CID]) -> Iterable
later_value=created_kv[created_key]
)
for updated_key in created_kv.keys() & deleted_kv.keys():
v1 = created_kv[updated_key]
v2 = deleted_kv[updated_key]
v1 = deleted_kv[updated_key]
v2 = created_kv[updated_key]
if v1 != v2:
yield RecordDelta(
delta_type=DeltaType.UPDATED,
Expand All @@ -54,8 +54,8 @@ def record_diff(ns: NodeStore, created: set[CID], deleted: set[CID]) -> Iterable
yield RecordDelta(
delta_type=DeltaType.DELETED,
path=deleted_key,
prior_value=None,
later_value=deleted_kv[deleted_key]
prior_value=deleted_kv[deleted_key],
later_value=None
)

def very_slow_mst_diff(ns: NodeStore, root_a: CID, root_b: CID):
Expand Down

0 comments on commit b4ef2e0

Please sign in to comment.