Alpha: fix punishment for unrevealed nonces.

This commit is contained in:
Grégoire Henry 2018-11-23 18:27:57 +01:00 committed by Pierre Boutillier
parent 8a8912c9bd
commit 6e0cc99a03
No known key found for this signature in database
GPG Key ID: C2F73508B56A193C

View File

@ -398,7 +398,8 @@ let burn_fees ctxt delegate cycle amount =
ctxt delegate old_amount >>=? fun ctxt -> ctxt delegate old_amount >>=? fun ctxt ->
return (Tez_repr.zero, ctxt) return (Tez_repr.zero, ctxt)
end >>=? fun (new_amount, 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 = 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 match Tez_repr.(old_amount -? amount) with
| Error _ -> Tez_repr.zero | Error _ -> Tez_repr.zero
| Ok new_amount -> new_amount in | 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