Make priviledged functions explicity use origin (#3045)

* Make priviledged functions explicity use `origin`

* Fix typo in docs

* Fix more tests

* Remove `root` pathway, add semicolons
This commit is contained in:
Shawn Tabrizi
2019-07-08 15:51:54 +02:00
committed by Bastian Köcher
parent 29311e98b4
commit 3d72844710
11 changed files with 71 additions and 114 deletions
@@ -53,7 +53,8 @@ mod module1 {
fn deposit_event<T, I>() = default;
fn one() {
fn one(origin) {
system::ensure_root(origin)?;
Self::deposit_event(RawEvent::AnotherVariant(3));
}
}
@@ -19,7 +19,7 @@ macro_rules! reserved {
srml_support::decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
fn $reserved() -> Result { unreachable!() }
fn $reserved(_origin) -> Result { unreachable!() }
}
}
}