Proto: check the 'delegatable-ity' before to remove a delegate key.
We use the `remove` function instead of `delete` to check the delegatable-ity to avoid a storage error (`remove` does nothing if the bucket does not exist).
This commit is contained in:
parent
d475d1ac29
commit
a7c8975ec6
@ -100,7 +100,7 @@ let delete c contract =
|
||||
Roll_storage.Contract.assert_empty c contract >>=? fun () ->
|
||||
Storage.Contract.Balance.delete c contract >>=? fun c ->
|
||||
Storage.Contract.Manager.delete c contract >>=? fun c ->
|
||||
Storage.Contract.Delegate.delete c contract >>=? fun c ->
|
||||
Storage.Contract.Delegate.remove c contract >>= fun c ->
|
||||
Storage.Contract.Spendable.delete c contract >>=? fun c ->
|
||||
Storage.Contract.Delegatable.delete c contract >>=? fun c ->
|
||||
Storage.Contract.Counter.delete c contract >>=? fun c ->
|
||||
|
Loading…
Reference in New Issue
Block a user