mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 13:21:01 +00:00
Re-enable Identity on Westend and Rococo (#1901)
Reverts https://github.com/paritytech/polkadot-sdk/pull/1476 The `lock_pallet` / `unlock_pallet` additions in https://github.com/paritytech/polkadot-sdk/pull/1814 will result in less downtime for users than using runtime upgrades.
This commit is contained in:
@@ -67,9 +67,9 @@ use frame_support::{
|
|||||||
genesis_builder_helper::{build_config, create_default_config},
|
genesis_builder_helper::{build_config, create_default_config},
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
fungible::HoldConsideration, Contains, EitherOf, EitherOfDiverse, EverythingBut,
|
fungible::HoldConsideration, EitherOf, EitherOfDiverse, Everything, InstanceFilter,
|
||||||
InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage,
|
KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError,
|
||||||
ProcessMessageError, StorageMapShim, WithdrawReasons,
|
StorageMapShim, WithdrawReasons,
|
||||||
},
|
},
|
||||||
weights::{ConstantMultiplier, WeightMeter},
|
weights::{ConstantMultiplier, WeightMeter},
|
||||||
PalletId,
|
PalletId,
|
||||||
@@ -156,24 +156,13 @@ pub fn native_version() -> NativeVersion {
|
|||||||
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A type to identify calls to the Identity pallet. These will be filtered to prevent invocation,
|
|
||||||
/// locking the state of the pallet and preventing further updates to identities and sub-identities.
|
|
||||||
/// The locked state will be the genesis state of a new system chain and then removed from the Relay
|
|
||||||
/// Chain.
|
|
||||||
pub struct IdentityCalls;
|
|
||||||
impl Contains<RuntimeCall> for IdentityCalls {
|
|
||||||
fn contains(c: &RuntimeCall) -> bool {
|
|
||||||
matches!(c, RuntimeCall::Identity(_))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const Version: RuntimeVersion = VERSION;
|
pub const Version: RuntimeVersion = VERSION;
|
||||||
pub const SS58Prefix: u8 = 42;
|
pub const SS58Prefix: u8 = 42;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl frame_system::Config for Runtime {
|
impl frame_system::Config for Runtime {
|
||||||
type BaseCallFilter = EverythingBut<IdentityCalls>;
|
type BaseCallFilter = Everything;
|
||||||
type BlockWeights = BlockWeights;
|
type BlockWeights = BlockWeights;
|
||||||
type BlockLength = BlockLength;
|
type BlockLength = BlockLength;
|
||||||
type DbWeight = RocksDbWeight;
|
type DbWeight = RocksDbWeight;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ use frame_support::{
|
|||||||
genesis_builder_helper::{build_config, create_default_config},
|
genesis_builder_helper::{build_config, create_default_config},
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, EverythingBut,
|
fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Everything,
|
||||||
InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, ProcessMessage,
|
InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, ProcessMessage,
|
||||||
ProcessMessageError, WithdrawReasons,
|
ProcessMessageError, WithdrawReasons,
|
||||||
},
|
},
|
||||||
@@ -160,24 +160,13 @@ pub fn native_version() -> NativeVersion {
|
|||||||
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A type to identify calls to the Identity pallet. These will be filtered to prevent invocation,
|
|
||||||
/// locking the state of the pallet and preventing further updates to identities and sub-identities.
|
|
||||||
/// The locked state will be the genesis state of a new system chain and then removed from the Relay
|
|
||||||
/// Chain.
|
|
||||||
pub struct IdentityCalls;
|
|
||||||
impl Contains<RuntimeCall> for IdentityCalls {
|
|
||||||
fn contains(c: &RuntimeCall) -> bool {
|
|
||||||
matches!(c, RuntimeCall::Identity(_))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const Version: RuntimeVersion = VERSION;
|
pub const Version: RuntimeVersion = VERSION;
|
||||||
pub const SS58Prefix: u8 = 42;
|
pub const SS58Prefix: u8 = 42;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl frame_system::Config for Runtime {
|
impl frame_system::Config for Runtime {
|
||||||
type BaseCallFilter = EverythingBut<IdentityCalls>;
|
type BaseCallFilter = Everything;
|
||||||
type BlockWeights = BlockWeights;
|
type BlockWeights = BlockWeights;
|
||||||
type BlockLength = BlockLength;
|
type BlockLength = BlockLength;
|
||||||
type RuntimeOrigin = RuntimeOrigin;
|
type RuntimeOrigin = RuntimeOrigin;
|
||||||
|
|||||||
Reference in New Issue
Block a user