Skip to content

Commit

Permalink
Disable the interlace call on coretime-polkadot
Browse files Browse the repository at this point in the history
  • Loading branch information
seadanda committed Aug 16, 2024
1 parent e718c64 commit 1126cf7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions system-parachains/coretime/coretime-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,22 @@ parameter_types! {

/// Filter out credit purchase calls until the credit system is implemented. Otherwise, users
/// may have chance of locking their funds forever on purchased credits they cannot use.
pub struct IsBrokerCreditPurchaseCall;
impl Contains<RuntimeCall> for IsBrokerCreditPurchaseCall {
/// Also filter the interlace call until the relay can support this fully.
pub struct IsFilteredBrokerCall;
impl Contains<RuntimeCall> for IsFilteredBrokerCall {
fn contains(c: &RuntimeCall) -> bool {
matches!(c, RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. }))
matches!(
c,
RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. }) |
RuntimeCall::Broker(pallet_broker::Call::interlace { .. })
)
}
}

// Configure FRAME pallets to include in runtime.
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime {
type BaseCallFilter = EverythingBut<IsBrokerCreditPurchaseCall>;
type BaseCallFilter = EverythingBut<IsFilteredBrokerCall>;
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
/// The nonce type for storing how many extrinsics an account has signed.
Expand Down

0 comments on commit 1126cf7

Please sign in to comment.