Add weight annotations to Timestamp, Sudo, Democracy, Treasury, et al. (#2694)

* Add some initial weighting notes

* Add Democracy and Sudo

* Add flags, fix formatting

* Add comments on finality-tracker

* Add a few mode modules.

* Update srml/democracy/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/democracy/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/system/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/system/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/system/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/system/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/treasury/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update and merge changes

* Update srml/system/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Remove unneeded comment

* Remove comment line

* Fix comment

* Fix formatting overall

* Apply suggestions from code review

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Clean up and polish

* Update srml/indices/src/lib.rs

* Update srml/staking/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Final nits.
This commit is contained in:
lsaether
2019-06-12 09:03:23 +02:00
committed by Bastian Köcher
parent 6feab51069
commit f0f32f9250
11 changed files with 239 additions and 15 deletions
+12
View File
@@ -110,6 +110,12 @@ decl_module! {
/// Authenticates the sudo key and dispatches a function call with `Root` origin.
///
/// The dispatch origin for this call must be _Signed_.
///
/// # <weight>
/// - O(1).
/// - Limited storage reads.
/// - No DB writes.
/// # </weight>
fn sudo(origin, proposal: Box<T::Proposal>) {
// This is a public call, so we ensure that the origin is some signed account.
let sender = ensure_signed(origin)?;
@@ -129,6 +135,12 @@ decl_module! {
/// Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.
///
/// The dispatch origin for this call must be _Signed_.
///
/// # <weight>
/// - O(1).
/// - Limited storage reads.
/// - One DB change.
/// # </weight>
fn set_key(origin, new: <T::Lookup as StaticLookup>::Source) {
// This is a public call, so we ensure that the origin is some signed account.
let sender = ensure_signed(origin)?;