Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Add support for custom runtime upgrade logic #5782

Merged
merged 1 commit into from
Apr 25, 2020

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Apr 25, 2020

This adds support for registering custom runtime upgrade logic that can
be implemented in the runtime directly instead of putting it into a module.

This adds support for registering custom runtime upgrade logic that can
be implemented in the runtime directly instead of putting it into a module.
@@ -180,8 +232,9 @@ where
) {
if Self::runtime_upgraded() {
// System is not part of `AllModules`, so we need to call this manually.
<frame_system::Module::<System> as OnRuntimeUpgrade>::on_runtime_upgrade();
let weight = <AllModules as OnRuntimeUpgrade>::on_runtime_upgrade();
let mut weight = <frame_system::Module::<System> as OnRuntimeUpgrade>::on_runtime_upgrade();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this a bug before?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was discarded before, so I would say yes.

Copy link
Member

@shawntabrizi shawntabrizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really hate the variable name COnRuntimeUpgrade :)

@bkchr bkchr merged commit eb259b2 into master Apr 25, 2020
@bkchr bkchr deleted the bkchr-custom-on-runtime-upgrade branch April 25, 2020 16:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants