mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 12:27:56 +00:00
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:
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user