frame-system: Add last_runtime_upgrade_spec_version (#2351)

Adds a function for querying the last runtime upgrade spec version. This
can be useful for when writing runtime level migrations to ensure that
they are not executed multiple times. An example would be a session key
migration.

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Bastian Köcher
2023-11-15 23:54:08 +01:00
committed by GitHub
parent f4bb17cc86
commit ea4085ab74
5 changed files with 71 additions and 27 deletions
+1
View File
@@ -25,6 +25,7 @@ sp-runtime = { path = "../../primitives/runtime", default-features = false, feat
sp-std = { path = "../../primitives/std", default-features = false}
sp-version = { path = "../../primitives/version", default-features = false, features = ["serde"] }
sp-weights = { path = "../../primitives/weights", default-features = false, features = ["serde"] }
docify = "0.2.0"
[dev-dependencies]
criterion = "0.4.0"