From edb40c792362d124425a727dd9b2c115ecbc11cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Mon, 19 Mar 2018 16:06:27 +0100 Subject: [PATCH] Alpha/test: allow to deactivate seed renewal --- src/proto_alpha/lib_protocol/src/level_repr.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_protocol/src/level_repr.ml b/src/proto_alpha/lib_protocol/src/level_repr.ml index a71c5fea7..5c03f4998 100644 --- a/src/proto_alpha/lib_protocol/src/level_repr.ml +++ b/src/proto_alpha/lib_protocol/src/level_repr.ml @@ -87,8 +87,9 @@ let from_raw (Int32.div level_position blocks_per_voting_period) in let voting_period_position = Int32.rem level_position blocks_per_voting_period in - let pos = Int32.rem cycle_position blocks_per_commitment in - let expected_commitment = Compare.Int32.(pos = 0l) in + let expected_commitment = + Compare.Int32.(Int32.rem cycle_position blocks_per_commitment = + Int32.pred blocks_per_commitment) in { level ; level_position ; cycle ; cycle_position ; voting_period ; voting_period_position ;