mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Trim compact solution for length during preparation (#8317)
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3351cb8869
commit
33425ce21f
@@ -517,6 +517,11 @@ parameter_types! {
|
||||
.get(DispatchClass::Normal)
|
||||
.max_extrinsic.expect("Normal extrinsics have a weight limit configured; qed")
|
||||
.saturating_sub(BlockExecutionWeight::get());
|
||||
// Solution can occupy 90% of normal block size
|
||||
pub MinerMaxLength: u32 = Perbill::from_rational(9u32, 10) *
|
||||
*RuntimeBlockLength::get()
|
||||
.max
|
||||
.get(DispatchClass::Normal);
|
||||
}
|
||||
|
||||
sp_npos_elections::generate_solution_type!(
|
||||
@@ -539,6 +544,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||
type SolutionImprovementThreshold = SolutionImprovementThreshold;
|
||||
type MinerMaxIterations = MinerMaxIterations;
|
||||
type MinerMaxWeight = MinerMaxWeight;
|
||||
type MinerMaxLength = MinerMaxLength;
|
||||
type MinerTxPriority = MultiPhaseUnsignedPriority;
|
||||
type DataProvider = Staking;
|
||||
type OnChainAccuracy = Perbill;
|
||||
|
||||
Reference in New Issue
Block a user