Companion for 12095 (#5924)

* Companion for 12095

* fix

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Kian Paimani
2022-08-28 14:41:43 +01:00
committed by GitHub
parent 5595c96d03
commit 2d8177cf70
5 changed files with 197 additions and 175 deletions
+5 -2
View File
@@ -489,6 +489,9 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type OffchainRepeat = OffchainRepeat;
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
#[cfg(feature = "fast-runtime")]
type Fallback = onchain::UnboundedExecution<OnChainSeqPhragmen>;
#[cfg(not(feature = "fast-runtime"))]
type Fallback = pallet_election_provider_multi_phase::NoFallback<Self>;
type GovernanceFallback = onchain::UnboundedExecution<OnChainSeqPhragmen>;
type Solver = SequentialPhragmen<
@@ -582,7 +585,7 @@ impl pallet_staking::EraPayout<Balance> for EraPayout {
parameter_types! {
// Six sessions in an era (6 hours).
pub const SessionsPerEra: SessionIndex = 6;
pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1);
// 28 eras for unbonding (7 days).
pub const BondingDuration: sp_staking::EraIndex = 28;
// 27 eras in which slashes can be cancelled (slightly less than 7 days).
@@ -1868,7 +1871,7 @@ sp_api::impl_runtime_apis! {
Balance,
> for Runtime {
fn pending_rewards(member: AccountId) -> Balance {
NominationPools::pending_rewards(member)
NominationPools::pending_rewards(member).unwrap_or_default()
}
}