Unverified Commit 3b5bce88 authored by Kian Paimani's avatar Kian Paimani Committed by GitHub
Browse files

Comanion for substrate/pull/6173 (#1184)

* Make it work

* Upsub
parent 217083a9
Pipeline #95046 passed with stages
in 21 minutes and 31 seconds
This diff is collapsed.
...@@ -1772,6 +1772,7 @@ mod tests { ...@@ -1772,6 +1772,7 @@ mod tests {
type Call = Call; type Call = Call;
type UnsignedPriority = StakingUnsignedPriority; type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = (); type MaxIterations = ();
type MinSolutionScoreBump = ();
} }
impl attestations::Trait for Test { impl attestations::Trait for Test {
......
...@@ -846,6 +846,7 @@ mod tests { ...@@ -846,6 +846,7 @@ mod tests {
type Call = Call; type Call = Call;
type UnsignedPriority = StakingUnsignedPriority; type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = (); type MaxIterations = ();
type MinSolutionScoreBump = ();
} }
impl timestamp::Trait for Test { impl timestamp::Trait for Test {
......
...@@ -287,7 +287,8 @@ parameter_types! { ...@@ -287,7 +287,8 @@ parameter_types! {
pub const MaxNominatorRewardedPerValidator: u32 = 64; pub const MaxNominatorRewardedPerValidator: u32 = 64;
// quarter of the last session will be for election. // quarter of the last session will be for election.
pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4; pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4;
pub const MaxIterations: u32 = 5; pub const MaxIterations: u32 = 10;
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
} }
impl staking::Trait for Runtime { impl staking::Trait for Runtime {
...@@ -311,6 +312,7 @@ impl staking::Trait for Runtime { ...@@ -311,6 +312,7 @@ impl staking::Trait for Runtime {
type Call = Call; type Call = Call;
type UnsignedPriority = StakingUnsignedPriority; type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = MaxIterations; type MaxIterations = MaxIterations;
type MinSolutionScoreBump = MinSolutionScoreBump;
} }
parameter_types! { parameter_types! {
......
...@@ -306,7 +306,8 @@ parameter_types! { ...@@ -306,7 +306,8 @@ parameter_types! {
pub const MaxNominatorRewardedPerValidator: u32 = 64; pub const MaxNominatorRewardedPerValidator: u32 = 64;
// quarter of the last session will be for election. // quarter of the last session will be for election.
pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 16; pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 16;
pub const MaxIterations: u32 = 5; pub const MaxIterations: u32 = 10;
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
} }
impl staking::Trait for Runtime { impl staking::Trait for Runtime {
...@@ -330,6 +331,7 @@ impl staking::Trait for Runtime { ...@@ -330,6 +331,7 @@ impl staking::Trait for Runtime {
type Call = Call; type Call = Call;
type UnsignedPriority = StakingUnsignedPriority; type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = MaxIterations; type MaxIterations = MaxIterations;
type MinSolutionScoreBump = MinSolutionScoreBump;
} }
const fn deposit(items: u32, bytes: u32) -> Balance { const fn deposit(items: u32, bytes: u32) -> Balance {
......
...@@ -289,6 +289,7 @@ parameter_types! { ...@@ -289,6 +289,7 @@ parameter_types! {
pub const ElectionLookahead: BlockNumber = 0; pub const ElectionLookahead: BlockNumber = 0;
pub const StakingUnsignedPriority: TransactionPriority = TransactionPriority::max_value() / 2; pub const StakingUnsignedPriority: TransactionPriority = TransactionPriority::max_value() / 2;
pub const MaxIterations: u32 = 10; pub const MaxIterations: u32 = 10;
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
} }
impl staking::Trait for Runtime { impl staking::Trait for Runtime {
...@@ -312,6 +313,7 @@ impl staking::Trait for Runtime { ...@@ -312,6 +313,7 @@ impl staking::Trait for Runtime {
type Call = Call; type Call = Call;
type UnsignedPriority = StakingUnsignedPriority; type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = MaxIterations; type MaxIterations = MaxIterations;
type MinSolutionScoreBump = MinSolutionScoreBump;
} }
impl grandpa::Trait for Runtime { impl grandpa::Trait for Runtime {
......
...@@ -278,6 +278,7 @@ parameter_types! { ...@@ -278,6 +278,7 @@ parameter_types! {
// quarter of the last session will be for election. // quarter of the last session will be for election.
pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4; pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4;
pub const MaxIterations: u32 = 10; pub const MaxIterations: u32 = 10;
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
} }
impl staking::Trait for Runtime { impl staking::Trait for Runtime {
...@@ -301,6 +302,7 @@ impl staking::Trait for Runtime { ...@@ -301,6 +302,7 @@ impl staking::Trait for Runtime {
type Call = Call; type Call = Call;
type UnsignedPriority = StakingUnsignedPriority; type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = MaxIterations; type MaxIterations = MaxIterations;
type MinSolutionScoreBump = MinSolutionScoreBump;
} }
parameter_types! { parameter_types! {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment