mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 02:17:58 +00:00
Remove Filter and use Contains instead (#9514)
* Remove Filter and use Contains instead * Fixes * Formatting * Update docs/Upgrading-2.0-to-3.0.md Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Typo Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -33,7 +33,7 @@ use frame_support::{
|
||||
dispatch::DispatchErrorWithPostInfo,
|
||||
parameter_types,
|
||||
storage::child,
|
||||
traits::{Currency, Filter, OnInitialize, ReservableCurrency},
|
||||
traits::{Contains, Currency, OnInitialize, ReservableCurrency},
|
||||
weights::{constants::WEIGHT_PER_SECOND, DispatchClass, PostDispatchInfo, Weight},
|
||||
};
|
||||
use frame_system::{self as system, EventRecord, Phase};
|
||||
@@ -197,7 +197,7 @@ parameter_types! {
|
||||
pub static ExistentialDeposit: u64 = 0;
|
||||
}
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type BlockWeights = BlockWeights;
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
@@ -282,8 +282,8 @@ impl TestFilter {
|
||||
}
|
||||
}
|
||||
|
||||
impl Filter<Call> for TestFilter {
|
||||
fn filter(call: &Call) -> bool {
|
||||
impl Contains<Call> for TestFilter {
|
||||
fn contains(call: &Call) -> bool {
|
||||
CALL_FILTER.with(|fltr| fltr.borrow()(call))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user