diff --git a/src/proto_alpha/lib_protocol/src/apply.ml b/src/proto_alpha/lib_protocol/src/apply.ml index 926118754..b48b56f4b 100644 --- a/src/proto_alpha/lib_protocol/src/apply.ml +++ b/src/proto_alpha/lib_protocol/src/apply.ml @@ -297,11 +297,12 @@ let may_start_new_cycle ctxt = | None -> return ctxt | Some last_cycle -> let new_cycle = Cycle.succ last_cycle in + let succ_new_cycle = Cycle.succ new_cycle in Bootstrap.refill ctxt >>=? fun ctxt -> Seed.clear_cycle ctxt last_cycle >>=? fun ctxt -> - Seed.compute_for_cycle ctxt (Cycle.succ new_cycle) >>=? fun ctxt -> + Seed.compute_for_cycle ctxt succ_new_cycle >>=? fun ctxt -> Roll.clear_cycle ctxt last_cycle >>=? fun ctxt -> - Roll.freeze_rolls_for_cycle ctxt (Cycle.succ new_cycle) >>=? fun ctxt -> + Roll.freeze_rolls_for_cycle ctxt succ_new_cycle >>=? fun ctxt -> let timestamp = Timestamp.current ctxt in Lwt.return (Timestamp.(timestamp +? (Constants.time_before_reward ctxt))) >>=? fun reward_date ->