From a2bc2c4aad05460cf7c939b288e990135064d4e4 Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 28 Jun 2018 16:48:34 +0200 Subject: [PATCH] Alpha: do not delete delegate change of an empty delegate account --- src/proto_alpha/lib_protocol/src/roll_storage.ml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/proto_alpha/lib_protocol/src/roll_storage.ml b/src/proto_alpha/lib_protocol/src/roll_storage.ml index 1c7fc095b..c09122023 100644 --- a/src/proto_alpha/lib_protocol/src/roll_storage.ml +++ b/src/proto_alpha/lib_protocol/src/roll_storage.ml @@ -301,11 +301,7 @@ module Delegate = struct if inactive then return (c, change) else loop c change end >>=? fun (c, change) -> Lwt.return Tez_repr.(change -? amount) >>=? fun change -> - Storage.Roll.Delegate_roll_list.mem c delegate >>= fun rolls -> - if not inactive && Tez_repr.(change = zero) && not rolls then - Storage.Roll.Delegate_change.delete c delegate - else - Storage.Roll.Delegate_change.set c delegate change + Storage.Roll.Delegate_change.set c delegate change let set_inactive ctxt delegate = ensure_inited ctxt delegate >>=? fun ctxt ->