Skip to content

Commit

Permalink
block request judgement
Browse files Browse the repository at this point in the history
  • Loading branch information
joepetrowski committed May 31, 2024
1 parent d8365e3 commit ecbefe8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed

- Transaction payments work via new `fungible` trait implementation ([polkadot-fellows/runtimes#332](https://github.com/polkadot-fellows/runtimes/pull/332))
- Block `request_judgement` calls on the Relay Chain ([polkadot-fellows/runtimes#338](https://github.com/polkadot-fellows/runtimes/pull/338))

### Fixed

Expand Down
14 changes: 11 additions & 3 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ use frame_support::{
genesis_builder_helper::{build_config, create_default_config},
parameter_types,
traits::{
fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Everything, Get,
InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage,
fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, EverythingBut,
Get, InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage,
ProcessMessageError, WithdrawReasons,
},
weights::{ConstantMultiplier, WeightMeter},
Expand Down Expand Up @@ -175,8 +175,16 @@ parameter_types! {
pub const SS58Prefix: u8 = 0;
}

/// A type to identify `identity::request_judgement` calls.
pub struct IsIdentityJudgementRequestCall;
impl Contains<RuntimeCall> for IsIdentityJudgementRequestCall {
fn contains(c: &RuntimeCall) -> bool {
matches!(c, RuntimeCall::Identity(pallet_identity::Call::request_judgement { .. }))
}
}

impl frame_system::Config for Runtime {
type BaseCallFilter = Everything;
type BaseCallFilter = EverythingBut<IsIdentityJudgementRequestCall>;
type BlockWeights = BlockWeights;
type BlockLength = BlockLength;
type RuntimeOrigin = RuntimeOrigin;
Expand Down

0 comments on commit ecbefe8

Please sign in to comment.