Companion for substrate#14471 (#7432)

* Companion for substrate#14471

* add missing MaxNominators constant

* missing MaxNominators in test-runtime

* missing MaxNominators in runtime/integration_tests

* Dont use deprecated functions

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fixup

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* update lockfile for {"substrate"}

* Update Substrate dep

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
André Silva
2023-07-18 17:03:38 +01:00
committed by GitHub
parent 2d4ec84a96
commit eb9b414644
9 changed files with 201 additions and 188 deletions
@@ -149,6 +149,7 @@ impl pallet_babe::Config for Test {
type DisabledValidators = ();
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = ConstU32<0>;
type KeyOwnerProof = sp_core::Void;
type EquivocationReportSystem = ();
}
+2
View File
@@ -277,6 +277,7 @@ impl pallet_babe::Config for Runtime {
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = MaxNominatorRewardedPerValidator;
}
parameter_types! {
@@ -715,6 +716,7 @@ impl pallet_grandpa::Config for Runtime {
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = MaxNominatorRewardedPerValidator;
type MaxSetIdSessionEntries = MaxSetIdSessionEntries;
type KeyOwnerProof = <Historical as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
+2 -1
View File
@@ -151,6 +151,7 @@ impl pallet_babe::Config for Test {
type DisabledValidators = ();
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = ConstU32<0>;
type KeyOwnerProof = sp_core::Void;
type EquivocationReportSystem = ();
}
@@ -439,7 +440,7 @@ impl ProcessMessage for TestProcessMessage {
Ok(w) => Weight::from_parts(w as u64, w as u64),
Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage`
};
if !meter.check_accrue(required) {
if meter.try_consume(required).is_err() {
return Err(ProcessMessageError::Overweight(required))
}
+2
View File
@@ -263,6 +263,7 @@ impl pallet_babe::Config for Runtime {
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = MaxNominatorRewardedPerValidator;
type KeyOwnerProof =
<Historical as KeyOwnerProofSystem<(KeyTypeId, pallet_babe::AuthorityId)>>::Proof;
@@ -763,6 +764,7 @@ impl pallet_grandpa::Config for Runtime {
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = MaxNominatorRewardedPerValidator;
type MaxSetIdSessionEntries = MaxSetIdSessionEntries;
type KeyOwnerProof = <Historical as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
+3
View File
@@ -249,6 +249,7 @@ impl pallet_babe::Config for Runtime {
type DisabledValidators = Session;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = ConstU32<0>;
type KeyOwnerProof =
<Historical as KeyOwnerProofSystem<(KeyTypeId, pallet_babe::AuthorityId)>>::Proof;
type EquivocationReportSystem =
@@ -659,6 +660,7 @@ impl pallet_grandpa::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = ConstU32<0>;
type MaxSetIdSessionEntries = MaxSetIdSessionEntries;
type KeyOwnerProof = <Historical as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
type EquivocationReportSystem =
@@ -1261,6 +1263,7 @@ parameter_types! {
impl pallet_beefy::Config for Runtime {
type BeefyId = BeefyId;
type MaxAuthorities = MaxAuthorities;
type MaxNominators = ConstU32<0>;
type MaxSetIdSessionEntries = BeefySetIdSessionEntries;
type OnNewValidatorSet = MmrLeaf;
type WeightInfo = ();
+2
View File
@@ -186,6 +186,7 @@ impl pallet_babe::Config for Runtime {
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = MaxNominatorRewardedPerValidator;
type KeyOwnerProof =
<Historical as KeyOwnerProofSystem<(KeyTypeId, pallet_babe::AuthorityId)>>::Proof;
@@ -370,6 +371,7 @@ impl pallet_grandpa::Config for Runtime {
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = MaxNominatorRewardedPerValidator;
type MaxSetIdSessionEntries = MaxSetIdSessionEntries;
type KeyOwnerProof = sp_core::Void;
+2
View File
@@ -227,6 +227,7 @@ impl pallet_babe::Config for Runtime {
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = MaxNominatorRewardedPerValidator;
type KeyOwnerProof =
<Historical as KeyOwnerProofSystem<(KeyTypeId, pallet_babe::AuthorityId)>>::Proof;
@@ -591,6 +592,7 @@ impl pallet_grandpa::Config for Runtime {
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxNominators = MaxNominatorRewardedPerValidator;
type MaxSetIdSessionEntries = MaxSetIdSessionEntries;
type KeyOwnerProof = <Historical as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;