Mandate weight annotation (#5357)

* Disallow default weight

* Fix build and test

* Fix tests

* Fix another beloved ui test.

* fix beloved trybuild tests

* fix treasury?

* Final test fix

* Fix build

* Fix another one

* Fix

* More doctest fix
This commit is contained in:
Kian Paimani
2020-03-26 11:17:05 +01:00
committed by GitHub
parent 7cbadd73be
commit a0772117ac
27 changed files with 111 additions and 48 deletions
@@ -27,11 +27,13 @@ use frame_system::{RawOrigin, ensure_signed, ensure_none};
decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
fn dummy(origin, _n: u32) -> DispatchResult {
let _sender = ensure_signed(origin)?;
Ok(())
}
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
fn other_dummy(origin, _n: u32) -> DispatchResult {
let _sender = ensure_none(origin)?;
Ok(())