Skip to content

Commit

Permalink
align cere/dev migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
aie0 committed Jul 20, 2024
1 parent 705a920 commit 5c29c48
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions runtime/cere-dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,20 +315,20 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::Any => true,
ProxyType::NonTransfer => !matches!(
c,
RuntimeCall::Balances(..) |
RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. }) |
RuntimeCall::Indices(pallet_indices::Call::transfer { .. }) |
RuntimeCall::NominationPools(..) |
RuntimeCall::ConvictionVoting(..) |
RuntimeCall::Referenda(..) |
RuntimeCall::Whitelist(..)
RuntimeCall::Balances(..)
| RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. })
| RuntimeCall::Indices(pallet_indices::Call::transfer { .. })
| RuntimeCall::NominationPools(..)
| RuntimeCall::ConvictionVoting(..)
| RuntimeCall::Referenda(..)
| RuntimeCall::Whitelist(..)
),
ProxyType::Governance => matches!(
c,
RuntimeCall::Treasury(..) |
RuntimeCall::ConvictionVoting(..) |
RuntimeCall::Referenda(..) |
RuntimeCall::Whitelist(..)
RuntimeCall::Treasury(..)
| RuntimeCall::ConvictionVoting(..)
| RuntimeCall::Referenda(..)
| RuntimeCall::Whitelist(..)
),
ProxyType::Staking => matches!(c, RuntimeCall::Staking(..)),
}
Expand Down Expand Up @@ -669,8 +669,8 @@ impl Get<Option<BalancingConfig>> for OffchainRandomBalancing {
max => {
let seed = sp_io::offchain::random_seed();
let random = <u32>::decode(&mut TrailingZeroInput::new(&seed))
.expect("input is padded with zeroes; qed") %
max.saturating_add(1);
.expect("input is padded with zeroes; qed")
% max.saturating_add(1);
random as usize
},
};
Expand Down Expand Up @@ -1376,7 +1376,11 @@ pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;

/// Runtime migrations
type Migrations = (pallet_ddc_customers::migration::MigrateToV2<Runtime>,);
type Migrations = (
pallet_ddc_clusters::migrations::v2::MigrateToV2<Runtime>,
pallet_ddc_staking::migrations::v1::MigrateToV1<Runtime>,
pallet_ddc_customers::migration::MigrateToV1<Runtime>,
);

/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Expand Down

0 comments on commit 5c29c48

Please sign in to comment.