From df3fdc8ccb24380e35f0d9dacdc493094320ee54 Mon Sep 17 00:00:00 2001 From: Deepthi S Kumar Date: Thu, 11 Aug 2022 14:29:38 -0700 Subject: [PATCH] shift sequence events once per block and if there are events --- src/lib/transaction_logic/parties_logic.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/transaction_logic/parties_logic.ml b/src/lib/transaction_logic/parties_logic.ml index 7eed86f379f..e462678e4a3 100644 --- a/src/lib/transaction_logic/parties_logic.ml +++ b/src/lib/transaction_logic/parties_logic.ml @@ -1305,11 +1305,11 @@ module Make (Inputs : Inputs_intf) = struct let s1 = Field.if_ is_empty ~then_:s1' ~else_:s1_updated in (* Shift along if last update wasn't this slot *) let is_this_slot = Global_slot.equal txn_global_slot last_sequence_slot in - let is_full_and_different_slot = Bool.((not is_empty) &&& is_this_slot) in - let s5 = Field.if_ is_full_and_different_slot ~then_:s5' ~else_:s4' in - let s4 = Field.if_ is_full_and_different_slot ~then_:s4' ~else_:s3' in - let s3 = Field.if_ is_full_and_different_slot ~then_:s3' ~else_:s2' in - let s2 = Field.if_ is_full_and_different_slot ~then_:s2' ~else_:s1' in + let is_empty_or_this_slot = Bool.(is_empty ||| is_this_slot) in + let s5 = Field.if_ is_empty_or_this_slot ~then_:s5' ~else_:s4' in + let s4 = Field.if_ is_empty_or_this_slot ~then_:s4' ~else_:s3' in + let s3 = Field.if_ is_empty_or_this_slot ~then_:s3' ~else_:s2' in + let s2 = Field.if_ is_empty_or_this_slot ~then_:s2' ~else_:s1' in let last_sequence_slot = Global_slot.if_ is_empty ~then_:last_sequence_slot ~else_:txn_global_slot