From 71662b35dadb82ce26d65abc50a4b5a86378323a Mon Sep 17 00:00:00 2001 From: Trubnikov Sergey Date: Fri, 3 Mar 2023 13:45:03 +0000 Subject: [PATCH] fix: remove CallFilter from as_derevative --- frame/utility/src/lib.rs | 2 +- frame/utility/src/tests.rs | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/frame/utility/src/lib.rs b/frame/utility/src/lib.rs index c3bf21b0c0af5..6c3edb0b9c8a2 100644 --- a/frame/utility/src/lib.rs +++ b/frame/utility/src/lib.rs @@ -287,7 +287,7 @@ pub mod pallet { origin.set_caller_from(frame_system::RawOrigin::Signed(pseudonym)); let info = call.get_dispatch_info(); - let result = Self::dispatch_filtered(origin, *call); + let result = call.dispatch(origin); // Always take into account the base weight of this call. let mut weight = T::WeightInfo::as_derivative() .saturating_add(T::DbWeight::get().reads_writes(1, 1)); diff --git a/frame/utility/src/tests.rs b/frame/utility/src/tests.rs index a6e77f2cd8a85..20698fdbcdf65 100644 --- a/frame/utility/src/tests.rs +++ b/frame/utility/src/tests.rs @@ -412,20 +412,6 @@ fn as_derivative_basic_filters() { }); } -#[test] -fn as_derivative_call_filters() { - new_test_ext().execute_with(|| { - assert_err_ignore_postinfo!( - Utility::as_derivative( - RuntimeOrigin::signed(1), - 1, - Box::new(RuntimeCall::Example(example::Call::not_batchable { arg: 0 })), - ), - DispatchError::from(frame_system::Error::::CallFiltered), - ); - }); -} - #[test] fn batch_with_root_works() { new_test_ext().execute_with(|| {