Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fix: remove CallFilter from as_derevative
Browse files Browse the repository at this point in the history
  • Loading branch information
bugrazoid committed Mar 3, 2023
1 parent c5c2215 commit a1deb4b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion frame/utility/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
14 changes: 0 additions & 14 deletions frame/utility/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Test>::CallFiltered),
);
});
}

#[test]
fn batch_with_root_works() {
new_test_ext().execute_with(|| {
Expand Down

0 comments on commit a1deb4b

Please sign in to comment.