mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Timestamp weights (#5775)
* calculate weight for timestamp::set * reduce db count in kill_identity weight calculation * return weight of on_finalize in on_initialize * add comment * import Weight * address review comments to update db weight count * fix full block import test * update weights and benchmark info to latest benchmark data * update identity pallet weights and benchmark info Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -18,7 +18,7 @@ use codec::{Encode, Decode, Joiner};
|
||||
use frame_support::{
|
||||
StorageValue, StorageMap,
|
||||
traits::Currency,
|
||||
weights::{GetDispatchInfo, DispatchInfo, DispatchClass, Pays},
|
||||
weights::{GetDispatchInfo, DispatchInfo, DispatchClass},
|
||||
};
|
||||
use sp_core::{
|
||||
NeverNativeValue, map, traits::Externalities, storage::{well_known_keys, Storage},
|
||||
@@ -337,8 +337,9 @@ fn full_native_block_import_works() {
|
||||
let events = vec![
|
||||
EventRecord {
|
||||
phase: Phase::ApplyExtrinsic(0),
|
||||
// timestamp set call with weight 9_000_000 + 2 read + 1 write
|
||||
event: Event::frame_system(frame_system::RawEvent::ExtrinsicSuccess(
|
||||
DispatchInfo { weight: 0, class: DispatchClass::Mandatory, ..Default::default() }
|
||||
DispatchInfo { weight: 9_000_000 + 2 * 60_000_000 + 1 * 200_000_000, class: DispatchClass::Mandatory, ..Default::default() }
|
||||
)),
|
||||
topics: vec![],
|
||||
},
|
||||
@@ -390,8 +391,9 @@ fn full_native_block_import_works() {
|
||||
let events = vec![
|
||||
EventRecord {
|
||||
phase: Phase::ApplyExtrinsic(0),
|
||||
// timestamp set call with weight 9_000_000 + 2 read + 1 write
|
||||
event: Event::frame_system(frame_system::RawEvent::ExtrinsicSuccess(
|
||||
DispatchInfo { weight: 0, class: DispatchClass::Mandatory, pays_fee: Pays::Yes }
|
||||
DispatchInfo { weight: 9_000_000 + 2 * 60_000_000 + 1 * 200_000_000, class: DispatchClass::Mandatory, ..Default::default() }
|
||||
)),
|
||||
topics: vec![],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user