From 6e0cc99a0319122a8bd7303d10a22e7b8ea5accc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Fri, 23 Nov 2018 18:27:57 +0100 Subject: [PATCH] Alpha: fix punishment for unrevealed nonces. --- src/proto_alpha/lib_protocol/src/delegate_storage.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_protocol/src/delegate_storage.ml b/src/proto_alpha/lib_protocol/src/delegate_storage.ml index 45a1a6324..f00941a48 100644 --- a/src/proto_alpha/lib_protocol/src/delegate_storage.ml +++ b/src/proto_alpha/lib_protocol/src/delegate_storage.ml @@ -398,7 +398,8 @@ let burn_fees ctxt delegate cycle amount = ctxt delegate old_amount >>=? fun ctxt -> return (Tez_repr.zero, ctxt) end >>=? fun (new_amount, ctxt) -> - Storage.Contract.Frozen_fees.set (ctxt, contract) cycle new_amount + Storage.Contract.Frozen_fees.init_set (ctxt, contract) cycle new_amount >>= fun ctxt -> + return ctxt let get_frozen_rewards ctxt contract cycle = @@ -426,7 +427,8 @@ let burn_rewards ctxt delegate cycle amount = match Tez_repr.(old_amount -? amount) with | Error _ -> Tez_repr.zero | Ok new_amount -> new_amount in - Storage.Contract.Frozen_rewards.set (ctxt, contract) cycle new_amount + Storage.Contract.Frozen_rewards.init_set (ctxt, contract) cycle new_amount >>= fun ctxt -> + return ctxt