mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 14:27:57 +00:00
Introduce in-origin filtering (#6318)
* impl filter in origin * remove IsCallable usage. Breaking: utility::batch(root, calls) no longer bypass BasicCallFilter * rename BasicCallFilter -> BaseCallFilter * refactor code * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * remove forgotten temporar comment * better add suggestion in another PR * refactor: use Clone instead of mem::replace * fix tests * fix tests * fix tests * fix benchmarks * Make root bypass filter in utility::batch * fix unused imports Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
97cac4ce8b
commit
c2ad27271b
@@ -29,7 +29,7 @@ fn cancel_referendum_should_work() {
|
||||
0
|
||||
);
|
||||
assert_ok!(Democracy::vote(Origin::signed(1), r, aye(1)));
|
||||
assert_ok!(Democracy::cancel_referendum(Origin::ROOT, r.into()));
|
||||
assert_ok!(Democracy::cancel_referendum(Origin::root(), r.into()));
|
||||
|
||||
next_block();
|
||||
next_block();
|
||||
@@ -53,8 +53,8 @@ fn cancel_queued_should_work() {
|
||||
|
||||
assert!(pallet_scheduler::Agenda::<Test>::get(6)[0].is_some());
|
||||
|
||||
assert_noop!(Democracy::cancel_queued(Origin::ROOT, 1), Error::<Test>::ProposalMissing);
|
||||
assert_ok!(Democracy::cancel_queued(Origin::ROOT, 0));
|
||||
assert_noop!(Democracy::cancel_queued(Origin::root(), 1), Error::<Test>::ProposalMissing);
|
||||
assert_ok!(Democracy::cancel_queued(Origin::root(), 0));
|
||||
assert!(pallet_scheduler::Agenda::<Test>::get(6)[0].is_none());
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user