mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
Introduce sensible weight constants (#12868)
* Introduce sensible weight constants * cargo fmt * Remove unused import * Add missing import * ".git/.scripts/bench-bot.sh" pallet dev pallet_lottery Co-authored-by: command-bot <>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
//! This file was not auto-generated.
|
||||
|
||||
use frame_support::weights::{
|
||||
constants::{RocksDbWeight as DbWeight, WEIGHT_PER_MICROS, WEIGHT_PER_NANOS},
|
||||
constants::{RocksDbWeight as DbWeight, WEIGHT_REF_TIME_PER_MICROS, WEIGHT_REF_TIME_PER_NANOS},
|
||||
Weight,
|
||||
};
|
||||
|
||||
@@ -34,14 +34,19 @@ impl crate::WeightInfo for () {
|
||||
const MAX_NOMINATORS: u64 = 200;
|
||||
|
||||
// checking membership proof
|
||||
(35u64 * WEIGHT_PER_MICROS)
|
||||
.saturating_add((175u64 * WEIGHT_PER_NANOS).saturating_mul(validator_count))
|
||||
Weight::from_ref_time(35u64 * WEIGHT_REF_TIME_PER_MICROS)
|
||||
.saturating_add(
|
||||
Weight::from_ref_time(175u64 * WEIGHT_REF_TIME_PER_NANOS)
|
||||
.saturating_mul(validator_count),
|
||||
)
|
||||
.saturating_add(DbWeight::get().reads(5))
|
||||
// check equivocation proof
|
||||
.saturating_add(95u64 * WEIGHT_PER_MICROS)
|
||||
.saturating_add(Weight::from_ref_time(95u64 * WEIGHT_REF_TIME_PER_MICROS))
|
||||
// report offence
|
||||
.saturating_add(110u64 * WEIGHT_PER_MICROS)
|
||||
.saturating_add(25u64 * WEIGHT_PER_MICROS * MAX_NOMINATORS)
|
||||
.saturating_add(Weight::from_ref_time(110u64 * WEIGHT_REF_TIME_PER_MICROS))
|
||||
.saturating_add(Weight::from_ref_time(
|
||||
25u64 * WEIGHT_REF_TIME_PER_MICROS * MAX_NOMINATORS,
|
||||
))
|
||||
.saturating_add(DbWeight::get().reads(14 + 3 * MAX_NOMINATORS))
|
||||
.saturating_add(DbWeight::get().writes(10 + 3 * MAX_NOMINATORS))
|
||||
// fetching set id -> session index mappings
|
||||
@@ -49,6 +54,7 @@ impl crate::WeightInfo for () {
|
||||
}
|
||||
|
||||
fn note_stalled() -> Weight {
|
||||
(3u64 * WEIGHT_PER_MICROS).saturating_add(DbWeight::get().writes(1))
|
||||
Weight::from_ref_time(3u64 * WEIGHT_REF_TIME_PER_MICROS)
|
||||
.saturating_add(DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user