mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
Move runtime upgrade to frame-executive (#5197)
* Move runtime upgrade to `frame-executive` Instead of storing the runtime upgraded in the space of `frame-system`, this moves it to `frame-executive`. We also start storing the `spec_version` and `impl_version` the last runtime upgrade was applied. This scheme has multiple advantages: - We don't need to make sure that runtime upgrade was set. - This will work in the future when we want to test a runtime upgrade, because the `on_runtime_upgrade` will be executed automatically when the runtime changes. * Move `LAST_RUNTIME_UPGRADE` key to `frame-executive` * Add some more documentation * Make sure `spec_version` always increases between runtime upgrades * Fix test * Upgrade `parity-multiaddr` to fix compilation * Also check if the `spec_name` changed * Remove `RuntimeUpgraded` storage entry * Don't run on genesis
This commit is contained in:
@@ -43,7 +43,7 @@ use sp_runtime::{
|
||||
},
|
||||
};
|
||||
use sp_version::RuntimeVersion;
|
||||
pub use sp_core::{hash::H256};
|
||||
pub use sp_core::hash::H256;
|
||||
#[cfg(any(feature = "std", test))]
|
||||
use sp_version::NativeVersion;
|
||||
use frame_support::{impl_outer_origin, parameter_types, weights::Weight};
|
||||
@@ -64,10 +64,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("test"),
|
||||
impl_name: create_runtime_str!("parity-test"),
|
||||
authoring_version: 1,
|
||||
spec_version: 1,
|
||||
#[cfg(feature = "std")]
|
||||
impl_version: 1,
|
||||
#[cfg(not(feature = "std"))]
|
||||
spec_version: 2,
|
||||
impl_version: 2,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user