Skip to content

Commit 3fc7d04

Browse files
Tang Jiaweiglyh
authored andcommitted
network precondition instead of valid-while
1 parent 4d90a21 commit 3fc7d04

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

src/app/test_executive/hard_fork.ml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,16 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct
504504
{ zkapp_command_spec with
505505
preconditions =
506506
Some
507-
{ network = Zkapp_precondition.Protocol_state.accept
507+
{ network =
508+
{ Zkapp_precondition.Protocol_state.accept with
509+
global_slot_since_genesis =
510+
Check
511+
{ upper = Global_slot_since_genesis.of_int 400000
512+
; lower = Global_slot_since_genesis.zero
513+
}
514+
}
508515
; account = Zkapp_precondition.Account.accept
509-
; valid_while =
510-
Check
511-
Zkapp_precondition.Closed_interval.
512-
{ lower = Global_slot_since_genesis.zero
513-
; upper = Global_slot_since_genesis.of_int 400000
514-
}
516+
; valid_while = Ignore
515517
}
516518
}
517519
in
@@ -531,18 +533,20 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct
531533
{ zkapp_command_spec with
532534
preconditions =
533535
Some
534-
{ network = Zkapp_precondition.Protocol_state.accept
536+
{ network =
537+
{ Zkapp_precondition.Protocol_state.accept with
538+
global_slot_since_genesis =
539+
Check
540+
{ upper =
541+
Global_slot_since_genesis.of_int
542+
( Global_slot_since_hard_fork.to_int
543+
global_slot_since_hard_fork
544+
+ 500000 - 5 )
545+
; lower = Global_slot_since_genesis.zero
546+
}
547+
}
535548
; account = Zkapp_precondition.Account.accept
536-
; valid_while =
537-
Check
538-
Zkapp_precondition.Closed_interval.
539-
{ lower = Global_slot_since_genesis.zero
540-
; upper =
541-
Global_slot_since_genesis.of_int
542-
( Global_slot_since_hard_fork.to_int
543-
global_slot_since_hard_fork
544-
+ 500000 - 5 )
545-
}
549+
; valid_while = Ignore
546550
}
547551
}
548552
in

0 commit comments

Comments
 (0)