Skip to content

Commit

Permalink
Update parachain-staking and add migration (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
sea212 authored Mar 31, 2022
1 parent 05c67d1 commit 8857318
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cumulus-relay-chain-local = { branch = "moonbeam-polkadot-v0.9.16", git = "https
nimbus-consensus = { branch = "moonbeam-polkadot-v0.9.16", default-features = false, git = "https://github.com/purestake/nimbus", optional = true }
nimbus-primitives = { branch = "moonbeam-polkadot-v0.9.16", default-features = false, git = "https://github.com/purestake/nimbus", optional = true }
pallet-author-inherent = { branch = "moonbeam-polkadot-v0.9.16", default-features = false, git = "https://github.com/purestake/nimbus", optional = true }
parachain-staking = { rev = "45257659f04b28dd4927b5dc611fac6f9e8905fd", git = "https://github.com/purestake/moonbeam", optional = true }
parachain-staking = { rev = "30b955354981b6d11808c10d728e1b93fa919f33", git = "https://github.com/purestake/moonbeam", optional = true }
parity-scale-codec = { optional = true, version = "3.0.0" }
sc-chain-spec = { branch = "moonbeam-polkadot-v0.9.16", git = "https://github.com/purestake/substrate", optional = true }
sc-network = { branch = "moonbeam-polkadot-v0.9.16", git = "https://github.com/purestake/substrate", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ parachain-info = { branch = "moonbeam-polkadot-v0.9.16", default-features = fals

nimbus-primitives = { branch = "moonbeam-polkadot-v0.9.16", default-features = false, git = "https://github.com/purestake/nimbus", optional = true }
pallet-author-inherent = { branch = "moonbeam-polkadot-v0.9.16", default-features = false, git = "https://github.com/purestake/nimbus", optional = true }
pallet-author-mapping = { rev = "45257659f04b28dd4927b5dc611fac6f9e8905fd", default-features = false, git = "https://github.com/purestake/moonbeam", optional = true }
pallet-author-mapping = { rev = "30b955354981b6d11808c10d728e1b93fa919f33", default-features = false, git = "https://github.com/purestake/moonbeam", optional = true }
pallet-author-slot-filter = { branch = "moonbeam-polkadot-v0.9.16", default-features = false, git = "https://github.com/purestake/nimbus", optional = true }
pallet-crowdloan-rewards = { branch = "moonbeam-polkadot-v0.9.16", default-features = false, git = "https://github.com/PureStake/crowdloan-rewards", optional = true }
parachain-staking = { rev = "45257659f04b28dd4927b5dc611fac6f9e8905fd", default-features = false, git = "https://github.com/purestake/moonbeam", optional = true }
parachain-staking = { rev = "30b955354981b6d11808c10d728e1b93fa919f33", default-features = false, git = "https://github.com/purestake/moonbeam", optional = true }

# Polkadot

Expand Down
10 changes: 8 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ pub use parachain_params::*;
pub use parameters::*;

#[cfg(feature = "parachain")]
use parachain_staking::migrations::{PurgeStaleStorage, RemoveExitQueue};
use parachain_staking::migrations::{
PurgeStaleStorage, RemoveExitQueue, SplitCandidateStateToDecreasePoV,
};

use alloc::{boxed::Box, vec, vec::Vec};
use frame_support::{
Expand Down Expand Up @@ -78,7 +80,11 @@ type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(PurgeStaleStorage<Runtime>, RemoveExitQueue<Runtime>),
(
PurgeStaleStorage<Runtime>,
RemoveExitQueue<Runtime>,
SplitCandidateStateToDecreasePoV<Runtime>,
),
>;

#[cfg(not(feature = "parachain"))]
Expand Down

0 comments on commit 8857318

Please sign in to comment.