mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
Companion for sub/8176 (#2622)
* Merge * Fixes * Fix build * remove dep. * undo dep. * upadte substrate * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * Fix lock * revert lock; cargo update -p sp-io * from_rational_approx -> from_rational * Silence more warnings Co-authored-by: Gav Wood <gavin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
@@ -74,7 +74,7 @@ pub mod fee {
|
||||
smallvec![WeightToFeeCoefficient {
|
||||
degree: 1,
|
||||
negative: false,
|
||||
coeff_frac: Perbill::from_rational_approximation(p % q, q),
|
||||
coeff_frac: Perbill::from_rational(p % q, q),
|
||||
coeff_integer: p / q,
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -309,12 +309,13 @@ parameter_types! {
|
||||
pub storage ElectionLookahead: BlockNumber = 0;
|
||||
pub storage StakingUnsignedPriority: TransactionPriority = TransactionPriority::max_value() / 2;
|
||||
pub storage MaxIterations: u32 = 10;
|
||||
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
|
||||
pub MinSolutionScoreBump: Perbill = Perbill::from_rational(5u32, 10_000);
|
||||
}
|
||||
|
||||
impl sp_election_providers::onchain::Config for Runtime {
|
||||
impl frame_election_provider_support::onchain::Config for Runtime {
|
||||
type AccountId = <Self as frame_system::Config>::AccountId;
|
||||
type BlockNumber = <Self as frame_system::Config>::BlockNumber;
|
||||
type BlockWeights = ();
|
||||
type Accuracy = sp_runtime::Perbill;
|
||||
type DataProvider = pallet_staking::Module<Self>;
|
||||
}
|
||||
@@ -333,7 +334,7 @@ impl pallet_staking::Config for Runtime {
|
||||
// A majority of the council can cancel the slash.
|
||||
type SlashCancelOrigin = frame_system::EnsureNever<()>;
|
||||
type SessionInterface = Self;
|
||||
type RewardCurve = RewardCurve;
|
||||
type EraPayout = pallet_staking::ConvertCurve<RewardCurve>;
|
||||
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
||||
type NextNewSession = Session;
|
||||
type ElectionLookahead = ElectionLookahead;
|
||||
@@ -342,7 +343,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type MaxIterations = MaxIterations;
|
||||
type OffchainSolutionWeightLimit = ();
|
||||
type MinSolutionScoreBump = MinSolutionScoreBump;
|
||||
type ElectionProvider = sp_election_providers::onchain::OnChainSequentialPhragmen<Self>;
|
||||
type ElectionProvider = frame_election_provider_support::onchain::OnChainSequentialPhragmen<Self>;
|
||||
type WeightInfo = ();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user