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

Commit e19d50b

Browse files
authored
Remove migration code. (#910)
* Remove migration code. * Bump Substrate * Bump runtime
1 parent 3a6c33f commit e19d50b

File tree

12 files changed

+361
-346
lines changed

12 files changed

+361
-346
lines changed

Cargo.lock

Lines changed: 350 additions & 314 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

runtime/common/src/claims.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,6 @@ decl_storage! {
141141
}
142142
}
143143

144-
mod migration {
145-
use super::*;
146-
147-
pub fn migrate<T: Trait>() {
148-
if let Ok(addresses) = Vec::<EthereumAddress>::decode(&mut &include_bytes!("./claims.scale")[..]) {
149-
for i in &addresses {
150-
Vesting::<T>::migrate_key_from_blake(i);
151-
Claims::<T>::migrate_key_from_blake(i);
152-
}
153-
}
154-
}
155-
}
156-
157144
decl_module! {
158145
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
159146
type Error = Error<T>;
@@ -164,10 +151,6 @@ decl_module! {
164151
/// Deposit one of this module's events by using the default implementation.
165152
fn deposit_event() = default;
166153

167-
fn on_runtime_upgrade() {
168-
migration::migrate::<T>();
169-
}
170-
171154
/// Make a claim to collect your DOTs.
172155
///
173156
/// The dispatch origin for this call must be _None_.
@@ -412,7 +395,7 @@ mod tests {
412395
type Version = ();
413396
type ModuleToIndex = ();
414397
type AccountData = balances::AccountData<u64>;
415-
type MigrateAccount = (); type OnNewAccount = ();
398+
type OnNewAccount = ();
416399
type OnKilledAccount = Balances;
417400
}
418401

runtime/common/src/crowdfund.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ mod tests {
615615
type Version = ();
616616
type ModuleToIndex = ();
617617
type AccountData = balances::AccountData<u64>;
618-
type MigrateAccount = (); type OnNewAccount = ();
618+
type OnNewAccount = ();
619619
type OnKilledAccount = Balances;
620620
}
621621
parameter_types! {

runtime/common/src/parachains.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ mod tests {
938938
type Version = ();
939939
type ModuleToIndex = ();
940940
type AccountData = balances::AccountData<u128>;
941-
type MigrateAccount = (); type OnNewAccount = ();
941+
type OnNewAccount = ();
942942
type OnKilledAccount = ();
943943
}
944944

runtime/common/src/registrar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ mod tests {
704704
type Version = ();
705705
type ModuleToIndex = ();
706706
type AccountData = balances::AccountData<u128>;
707-
type MigrateAccount = (); type OnNewAccount = ();
707+
type OnNewAccount = ();
708708
type OnKilledAccount = Balances;
709709
}
710710

runtime/common/src/slots.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ mod tests {
916916
type Version = ();
917917
type ModuleToIndex = ();
918918
type AccountData = balances::AccountData<u64>;
919-
type MigrateAccount = (); type OnNewAccount = ();
919+
type OnNewAccount = ();
920920
type OnKilledAccount = Balances;
921921
}
922922

runtime/kusama/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ democracy = { package = "pallet-democracy", git = "https://github.com/paritytech
3939
elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
4040
executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
4141
finality-tracker = { package = "pallet-finality-tracker", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
42-
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false, features = ["migrate-authorities"] }
42+
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
4343
identity = { package = "pallet-identity", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
4444
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
4545
indices = { package = "pallet-indices", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }

runtime/kusama/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
7878
spec_name: create_runtime_str!("kusama"),
7979
impl_name: create_runtime_str!("parity-kusama"),
8080
authoring_version: 2,
81-
spec_version: 1054,
81+
spec_version: 1055,
8282
impl_version: 1,
8383
apis: RUNTIME_API_VERSIONS,
8484
};
@@ -138,10 +138,6 @@ impl system::Trait for Runtime {
138138
type Version = Version;
139139
type ModuleToIndex = ModuleToIndex;
140140
type AccountData = balances::AccountData<Balance>;
141-
type MigrateAccount = (
142-
Balances, Identity, ElectionsPhragmen, Society, Session, Staking, Recovery, Democracy,
143-
Vesting, ImOnline
144-
);
145141
type OnNewAccount = ();
146142
type OnKilledAccount = ();
147143
}

runtime/polkadot/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ democracy = { package = "pallet-democracy", git = "https://github.com/paritytech
3838
elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
3939
executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
4040
finality-tracker = { package = "pallet-finality-tracker", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
41-
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false, features = ["migrate-authorities"] }
41+
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
4242
identity = { package = "pallet-identity", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
4343
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
4444
indices = { package = "pallet-indices", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }

runtime/polkadot/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl system::Trait for Runtime {
146146
type Version = Version;
147147
type ModuleToIndex = ModuleToIndex;
148148
type AccountData = balances::AccountData<Balance>;
149-
type MigrateAccount = (); type OnNewAccount = ();
149+
type OnNewAccount = ();
150150
type OnKilledAccount = ();
151151
}
152152

0 commit comments

Comments
 (0)