Verified Commit a96b03dd authored by Eugen Zalinescu's avatar Eugen Zalinescu Committed by Marco Stronati
Browse files

Alpha/Delegation: do not activate delegate when crediting

Remove the unneeded method for a delegate to reactivate itself by
provisioning its account. The delegate should simply re-register as
parent d65c58c2
......@@ -488,20 +488,7 @@ let credit c contract amount =
| Some balance ->
Lwt.return Tez_repr.(amount +? balance) >>=? fun balance ->
Storage.Contract.Balance.set c contract balance >>=? fun c ->
Roll_storage.Contract.add_amount c contract amount >>=? fun c ->
match contract with
| Implicit delegate ->
Delegate_storage.registered c delegate >>= fun registered ->
if registered then
Roll_storage.Delegate.set_active c delegate >>=? fun c ->
return c
return c
| Originated _ ->
return c
end >>=? fun c ->
return c
Roll_storage.Contract.add_amount c contract amount
let spend c contract amount =
is_spendable c contract >>=? fun spendable ->
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment