companion for new pools reward scheme (#5757)

* companion for new pools reward scheme

* fix build

* fix

* Fux

* update lockfile for {"substrate"}

* fmt

Co-authored-by: parity-processbot <>
This commit is contained in:
Kian Paimani
2022-07-13 16:34:24 +01:00
committed by GitHub
parent a1672452e1
commit f61dd0a049
5 changed files with 320 additions and 429 deletions
+1
View File
@@ -253,6 +253,7 @@ try-runtime = [
"pallet-indices/try-runtime",
"pallet-membership/try-runtime",
"pallet-multisig/try-runtime",
"pallet-nomination-pools/try-runtime",
"pallet-offences/try-runtime",
"pallet-preimage/try-runtime",
"pallet-proxy/try-runtime",
+6 -4
View File
@@ -72,7 +72,7 @@ use sp_runtime::{
OpaqueKeys, SaturatedConversion, Verify,
},
transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity},
ApplyExtrinsicResult, KeyTypeId, Perbill, Percent, Permill,
ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill,
};
use sp_staking::SessionIndex;
#[cfg(any(feature = "std", test))]
@@ -1439,13 +1439,15 @@ impl sp_runtime::traits::Convert<sp_core::U256, Balance> for U256ToBalance {
parameter_types! {
pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls");
pub const MinPointsToBalance: u32 = 10;
pub const MaxPointsToBalance: u8 = 10;
}
impl pallet_nomination_pools::Config for Runtime {
type Event = Event;
type WeightInfo = weights::pallet_nomination_pools::WeightInfo<Self>;
type Currency = Balances;
type CurrencyBalance = Balance;
type RewardCounter = FixedU128;
type BalanceToU256 = BalanceToU256;
type U256ToBalance = U256ToBalance;
type StakingInterface = Staking;
@@ -1454,7 +1456,7 @@ impl pallet_nomination_pools::Config for Runtime {
// we use the same number of allowed unlocking chunks as with staking.
type MaxUnbonding = <Self as pallet_staking::Config>::MaxUnlockingChunks;
type PalletId = PoolsPalletId;
type MinPointsToBalance = MinPointsToBalance;
type MaxPointsToBalance = MaxPointsToBalance;
}
construct_runtime! {
@@ -1600,7 +1602,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(),
pallet_nomination_pools::migration::v2::MigrateToV2<Runtime>,
>;
/// The payload being signed in the transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;