-
Notifications
You must be signed in to change notification settings - Fork 2.6k
contracts: Remove OnKilledAccount implementation #5397
Conversation
It looks like @athei signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
Just realized that the test-linux failure is actually legit. Needs addressing
Yes I am already on it. The two failing tests are:
This is legit and might be caused by the early exit in
I think this test makes no longer sense as as we specifically removed this functionality. Only |
Turns out that |
Contracts now longer rely on this callback to tell them when they are removed. Instead, they can only self destruct using `ext_terminate`.
c585935
to
cf8558e
Compare
The CI fail seems unrelated to the change. @pepyakin Any idea why this is failing? |
Apparently, this has something to do with #5366. I am not sure though what to do about it, except waiting for paritytech/polkadot#938 to be landed. |
// This should lead to the removal of all storage associated with this account. | ||
// This does not remove the contract storage as we are not notified about a | ||
// account removal. This cannot happen in reality because a contract can only | ||
// remove itself by `ext_terminate`. There is no external event that can remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And because we have an assumption that the contract's account is only controlled by that contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
yea, should be fixed now. |
Contracts now longer rely on this callback to tell them when they are removed. Instead, they can only self destruct using
ext_terminate
.Even without this change the now removed implementation wasn't called anymore in our default substrate runtime.
closes #4952