remove base weight annotations (#10373)

* remove base weight annotations

* Update frame/scheduler/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

Co-authored-by: Damilare <dakinlose@teamapt.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
dharjeezy
2021-11-26 05:38:21 +01:00
committed by GitHub
parent f12e22a62d
commit e0c47c48b2
3 changed files with 0 additions and 92 deletions
-46
View File
@@ -243,16 +243,6 @@ pub mod pallet {
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
/// Execute the scheduled calls
///
/// # <weight>
/// - S = Number of already scheduled calls
/// - N = Named scheduled calls
/// - P = Periodic Calls
/// - Base Weight: 9.243 + 23.45 * S µs
/// - DB Weight:
/// - Read: Agenda + Lookup * N + Agenda(Future) * P
/// - Write: Agenda + Lookup * N + Agenda(future) * P
/// # </weight>
fn on_initialize(now: T::BlockNumber) -> Weight {
let limit = T::MaximumWeight::get();
let mut queued = Agenda::<T>::take(now)
@@ -352,15 +342,6 @@ pub mod pallet {
#[pallet::call]
impl<T: Config> Pallet<T> {
/// Anonymously schedule a task.
///
/// # <weight>
/// - S = Number of already scheduled calls
/// - Base Weight: 22.29 + .126 * S µs
/// - DB Weight:
/// - Read: Agenda
/// - Write: Agenda
/// - Will use base weight of 25 which should be good for up to 30 scheduled calls
/// # </weight>
#[pallet::weight(<T as Config>::WeightInfo::schedule(T::MaxScheduledPerBlock::get()))]
pub fn schedule(
origin: OriginFor<T>,
@@ -382,15 +363,6 @@ pub mod pallet {
}
/// Cancel an anonymously scheduled task.
///
/// # <weight>
/// - S = Number of already scheduled calls
/// - Base Weight: 22.15 + 2.869 * S µs
/// - DB Weight:
/// - Read: Agenda
/// - Write: Agenda, Lookup
/// - Will use base weight of 100 which should be good for up to 30 scheduled calls
/// # </weight>
#[pallet::weight(<T as Config>::WeightInfo::cancel(T::MaxScheduledPerBlock::get()))]
pub fn cancel(origin: OriginFor<T>, when: T::BlockNumber, index: u32) -> DispatchResult {
T::ScheduleOrigin::ensure_origin(origin.clone())?;
@@ -400,15 +372,6 @@ pub mod pallet {
}
/// Schedule a named task.
///
/// # <weight>
/// - S = Number of already scheduled calls
/// - Base Weight: 29.6 + .159 * S µs
/// - DB Weight:
/// - Read: Agenda, Lookup
/// - Write: Agenda, Lookup
/// - Will use base weight of 35 which should be good for more than 30 scheduled calls
/// # </weight>
#[pallet::weight(<T as Config>::WeightInfo::schedule_named(T::MaxScheduledPerBlock::get()))]
pub fn schedule_named(
origin: OriginFor<T>,
@@ -432,15 +395,6 @@ pub mod pallet {
}
/// Cancel a named scheduled task.
///
/// # <weight>
/// - S = Number of already scheduled calls
/// - Base Weight: 24.91 + 2.907 * S µs
/// - DB Weight:
/// - Read: Agenda, Lookup
/// - Write: Agenda, Lookup
/// - Will use base weight of 100 which should be good for up to 30 scheduled calls
/// # </weight>
#[pallet::weight(<T as Config>::WeightInfo::cancel_named(T::MaxScheduledPerBlock::get()))]
pub fn cancel_named(origin: OriginFor<T>, id: Vec<u8>) -> DispatchResult {
T::ScheduleOrigin::ensure_origin(origin.clone())?;