mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 08:07:58 +00:00
* Update `pallet_offences` trait * remove session weight tests * "Update Substrate" * Update Cargo.lock * Update Cargo.lock * remove unused code Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+134
-134
File diff suppressed because it is too large
Load Diff
@@ -549,7 +549,6 @@ impl pallet_offences::Trait for Runtime {
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
type WeightSoftLimit = OffencesWeightSoftLimit;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl pallet_authority_discovery::Trait for Runtime {}
|
||||
|
||||
@@ -605,7 +605,6 @@ impl pallet_offences::Trait for Runtime {
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
type WeightSoftLimit = OffencesWeightSoftLimit;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl pallet_authority_discovery::Trait for Runtime {}
|
||||
|
||||
@@ -33,7 +33,6 @@ use polkadot_runtime::{self, Runtime};
|
||||
use runtime_common::MaximumBlockWeight;
|
||||
|
||||
use pallet_elections_phragmen::Call as PhragmenCall;
|
||||
use pallet_session::Call as SessionCall;
|
||||
use frame_system::Call as SystemCall;
|
||||
|
||||
type DbWeight = <Runtime as frame_system::Trait>::DbWeight;
|
||||
@@ -57,31 +56,6 @@ fn weight_of_system_set_code_is_correct() {
|
||||
assert_eq!(weight, expected_weight);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn weight_of_session_set_keys_is_correct() {
|
||||
// #[weight = 200_000_000
|
||||
// + T::DbWeight::get().reads(2 + T::Keys::key_ids().len() as Weight)
|
||||
// + T::DbWeight::get().writes(1 + T::Keys::key_ids().len() as Weight)]
|
||||
//
|
||||
// Polkadot has five possible session keys, so we default to key_ids.len() = 5
|
||||
let expected_weight = 200_000_000 + (DbWeight::get().read * (2 + 5)) + (DbWeight::get().write * (1 + 5));
|
||||
let weight = SessionCall::set_keys::<Runtime>(Default::default(), Default::default()).get_dispatch_info().weight;
|
||||
|
||||
assert_eq!(weight, expected_weight);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn weight_of_session_purge_keys_is_correct() {
|
||||
// #[weight = 120_000_000
|
||||
// + T::DbWeight::get().reads_writes(2, 1 + T::Keys::key_ids().len() as Weight)]
|
||||
//
|
||||
// Polkadot has five possible session keys, so we default to key_ids.len() = 5
|
||||
let expected_weight = 120_000_000 + (DbWeight::get().read * 2) + (DbWeight::get().write * (1 + 5));
|
||||
let weight = SessionCall::purge_keys::<Runtime>().get_dispatch_info().weight;
|
||||
|
||||
assert_eq!(weight, expected_weight);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn weight_of_phragmen_vote_is_correct() {
|
||||
// #[weight = 100_000_000]
|
||||
|
||||
@@ -598,7 +598,6 @@ impl pallet_offences::Trait for Runtime {
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
type WeightSoftLimit = OffencesWeightSoftLimit;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl pallet_authority_discovery::Trait for Runtime {}
|
||||
|
||||
@@ -378,7 +378,6 @@ impl pallet_offences::Trait for Runtime {
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
type WeightSoftLimit = OffencesWeightSoftLimit;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl pallet_authority_discovery::Trait for Runtime {}
|
||||
|
||||
@@ -356,7 +356,6 @@ impl pallet_offences::Trait for Runtime {
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
type WeightSoftLimit = OffencesWeightSoftLimit;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl pallet_authority_discovery::Trait for Runtime {}
|
||||
|
||||
Reference in New Issue
Block a user