mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 16:17:59 +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
@@ -290,6 +290,7 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
pub trait Trait: 'static {
|
||||
type BaseCallFilter;
|
||||
const ASSOCIATED_CONST: u64 = 500;
|
||||
type Origin: Into<Result<RawOrigin<Self::AccountId>, Self::Origin>>
|
||||
+ From<RawOrigin<Self::AccountId>>;
|
||||
@@ -297,6 +298,7 @@ mod tests {
|
||||
type BlockNumber: From<u32> + Encode;
|
||||
type SomeValue: Get<u32>;
|
||||
type ModuleToIndex: crate::traits::ModuleToIndex;
|
||||
type Call;
|
||||
}
|
||||
|
||||
decl_module! {
|
||||
@@ -436,11 +438,13 @@ mod tests {
|
||||
}
|
||||
|
||||
impl system::Trait for TestRuntime {
|
||||
type BaseCallFilter = ();
|
||||
type Origin = Origin;
|
||||
type AccountId = u32;
|
||||
type BlockNumber = u32;
|
||||
type SomeValue = SystemValue;
|
||||
type ModuleToIndex = ();
|
||||
type Call = Call;
|
||||
}
|
||||
|
||||
impl_runtime_metadata!(
|
||||
|
||||
Reference in New Issue
Block a user