Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
wangminqi committed Jul 10, 2024
1 parent aa9a008 commit 9d5622d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
20 changes: 20 additions & 0 deletions runtime/litentry/src/migration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ where
BalanceOf<T>: From<u128>,
{
pub fn replace_delegator_state_storage() -> frame_support::weights::Weight {
log::info!(
target: "ReplaceParachainStakingStorage",
"running migration to ParachainStaking DelegatorState"
);
let pallet_prefix: &[u8] = b"ParachainStaking";
let storage_item_prefix: &[u8] = b"DelegatorState";
// Read all the data into memory.
Expand Down Expand Up @@ -93,6 +97,10 @@ where
}

pub fn replace_candidate_info_storage() -> frame_support::weights::Weight {
log::info!(
target: "ReplaceParachainStakingStorage",
"running migration to ParachainStaking CandidateInfo"
);
let pallet_prefix: &[u8] = b"ParachainStaking";
let storage_item_prefix: &[u8] = b"CandidateInfo";
// Read all the data into memory.
Expand Down Expand Up @@ -145,6 +153,10 @@ where
}

pub fn replace_delegation_scheduled_requests_storage() -> frame_support::weights::Weight {
log::info!(
target: "ReplaceParachainStakingStorage",
"running migration to ParachainStaking DelegationScheduledRequests"
);
let pallet_prefix: &[u8] = b"ParachainStaking";
let storage_item_prefix: &[u8] = b"DelegationScheduledRequests";
// Read all the data into memory.
Expand Down Expand Up @@ -195,6 +207,10 @@ where
}

pub fn replace_top_delegations_storage() -> frame_support::weights::Weight {
log::info!(
target: "ReplaceParachainStakingStorage",
"running migration to ParachainStaking TopDelegations"
);
let pallet_prefix: &[u8] = b"ParachainStaking";
let storage_item_prefix: &[u8] = b"TopDelegations";
// Read all the data into memory.
Expand Down Expand Up @@ -238,6 +254,10 @@ where
}

pub fn replace_bottom_delegations_storage() -> frame_support::weights::Weight {
log::info!(
target: "ReplaceParachainStakingStorage",
"running migration to ParachainStaking BottomDelegations"
);
let pallet_prefix: &[u8] = b"ParachainStaking";
let storage_item_prefix: &[u8] = b"BottomDelegations";
// Read all the data into memory.
Expand Down
9 changes: 5 additions & 4 deletions runtime/rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,23 @@ try-runtime = [
"frame-try-runtime",
"orml-tokens/try-runtime",
"orml-xtokens/try-runtime",
"pallet-account-fix/try-runtime",
"pallet-asset-manager/try-runtime",
"pallet-aura/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-bitacross/try-runtime",
"pallet-bitacross-mimic/try-runtime",
"pallet-bounties/try-runtime",
"pallet-bridge/try-runtime",
"pallet-bridge-transfer/try-runtime",
"pallet-collective/try-runtime",
"pallet-democracy/try-runtime",
"pallet-ethereum/try-runtime",
"pallet-evm/try-runtime",
"pallet-identity/try-runtime",
"pallet-evm-assertions/try-runtime",
"pallet-extrinsic-filter/try-runtime",
"pallet-identity/try-runtime",
"pallet-group/try-runtime",
"pallet-identity-management/try-runtime",
"pallet-membership/try-runtime",
Expand All @@ -300,7 +304,4 @@ try-runtime = [
"pallet-vesting/try-runtime",
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
"pallet-account-fix/try-runtime",
"pallet-bitacross/try-runtime",
"pallet-bitacross-mimic/try-runtime",
]

0 comments on commit 9d5622d

Please sign in to comment.