Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
9d849985
Commit
9d849985
authored
1 year ago
by
Liam Aharon
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused code in runtime/polkadot/src/lib.rs (#7540)
* remove SetStorageVersions runtime upgrade * remove unused imports
parent
ebf29d7a
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
polkadot/runtime/polkadot/src/lib.rs
+0
-23
0 additions, 23 deletions
polkadot/runtime/polkadot/src/lib.rs
with
0 additions
and
23 deletions
polkadot/runtime/polkadot/src/lib.rs
+
0
−
23
View file @
9d849985
...
...
@@ -1488,35 +1488,12 @@ pub type Migrations = migrations::Unreleased;
#[allow(deprecated,
missing_docs)]
pub
mod
migrations
{
use
super
::
*
;
use
frame_support
::
traits
::{
GetStorageVersion
,
OnRuntimeUpgrade
,
StorageVersion
};
/// Unreleased migrations. Add new ones here:
pub
type
Unreleased
=
(
pallet_im_online
::
migration
::
v1
::
Migration
<
Runtime
>
,
parachains_configuration
::
migration
::
v7
::
MigrateToV7
<
Runtime
>
,
);
/// Migrations that set `StorageVersion`s we missed to set.
pub
struct
SetStorageVersions
;
impl
OnRuntimeUpgrade
for
SetStorageVersions
{
fn
on_runtime_upgrade
()
->
Weight
{
// `Referenda` pallet was added on chain after the migration to version `1` was added.
// Thus, it never required the migration and we just missed to set the correct `StorageVersion`.
let
storage_version
=
Referenda
::
on_chain_storage_version
();
if
storage_version
<
1
{
StorageVersion
::
new
(
1
)
.put
::
<
Referenda
>
();
}
// Was missed as part of: `runtime_common::session::migration::ClearOldSessionStorage<Runtime>`.
let
storage_version
=
Historical
::
on_chain_storage_version
();
if
storage_version
<
1
{
StorageVersion
::
new
(
1
)
.put
::
<
Historical
>
();
}
RocksDbWeight
::
get
()
.reads_writes
(
2
,
2
)
}
}
}
/// Unchecked extrinsic type as expected by this runtime.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment