From d475d1ac29f25abf006c6757d948ef7e8dc5ca50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Tue, 14 Feb 2017 09:42:52 +0100 Subject: [PATCH] Proto: fix `freeze_rolls_for_cycle` That's what happen when no-one review the code... --- src/proto/bootstrap/roll_storage.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto/bootstrap/roll_storage.ml b/src/proto/bootstrap/roll_storage.ml index 999bb988f..44893e070 100644 --- a/src/proto/bootstrap/roll_storage.ml +++ b/src/proto/bootstrap/roll_storage.ml @@ -44,12 +44,12 @@ let fold ctxt ~f init = let freeze_rolls_for_cycle ctxt cycle = fold ctxt (ctxt, Roll_repr.first) - ~f:(fun roll contract (ctxt, promoted_roll as acc) -> + ~f:(fun _roll contract (ctxt, promoted_roll as acc) -> get_contract_delegate ctxt contract >>=? function | None -> return acc | Some delegate -> Storage.Roll.Owner_for_cycle.init - ctxt (cycle, roll) delegate >>=? fun ctxt -> + ctxt (cycle, promoted_roll) delegate >>=? fun ctxt -> return (ctxt, Roll_repr.succ promoted_roll)) >>=? fun (ctxt, last_promoted_roll) -> Storage.Roll.Last_for_cycle.init ctxt cycle last_promoted_roll