Split SolutionImprovementThresholds into two types (#11221)

* Splitting `SolutionImprovementThreshold` in 2
One for Signed phase and one for Unsigned phase.

* Adding some tests

* Fixes after code review.
- Removing `GetDefault`.
- Shorter naming.
- More explicit test.
This commit is contained in:
Georges
2022-04-20 13:15:18 +01:00
committed by GitHub
parent 831753d42c
commit 85f7d63531
5 changed files with 75 additions and 15 deletions
+3 -2
View File
@@ -574,7 +574,7 @@ parameter_types! {
pub const SignedDepositBase: Balance = 1 * DOLLARS;
pub const SignedDepositByte: Balance = 1 * CENTS;
pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(1u32, 10_000);
pub BetterUnsignedThreshold: Perbill = Perbill::from_rational(1u32, 10_000);
// miner configs
pub const MultiPhaseUnsignedPriority: TransactionPriority = StakingUnsignedPriority::get() - 1u64;
@@ -664,7 +664,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type EstimateCallFee = TransactionPayment;
type SignedPhase = SignedPhase;
type UnsignedPhase = UnsignedPhase;
type SolutionImprovementThreshold = SolutionImprovementThreshold;
type BetterUnsignedThreshold = BetterUnsignedThreshold;
type BetterSignedThreshold = ();
type OffchainRepeat = OffchainRepeat;
type MinerMaxWeight = MinerMaxWeight;
type MinerMaxLength = MinerMaxLength;