mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
Adding benchmarking for new frame_election_provider_support (#11149)
* First stab at adding benchmarking for `election-provider-support` onchain * Adding `BoundedPhragMMS` and fixing stuff * Fixing node runtime * Fixing tests * Finalising all benchmarking stuff * better comments * Better benchmarking config * Better `WeightInfo` and benchmarking * Fixing tests * Adding some documentation * Fixing some typos * Incorporating review feedback * cleanup of rustdocs * rustdoc changes * changes after code review * Fixing some errors. * Fixing dependencies post merge * Bringing back `UnboundedExecution` * Better rustdoc and naming * Cargo.toml formatting
This commit is contained in:
@@ -276,10 +276,11 @@ parameter_types! {
|
||||
}
|
||||
|
||||
pub struct OnChainSeqPhragmen;
|
||||
impl onchain::ExecutionConfig for OnChainSeqPhragmen {
|
||||
impl onchain::Config for OnChainSeqPhragmen {
|
||||
type System = Runtime;
|
||||
type Solver = SequentialPhragmen<AccountId, SolutionAccuracyOf<Runtime>, Balancing>;
|
||||
type DataProvider = StakingMock;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
pub struct MockFallback;
|
||||
@@ -304,7 +305,7 @@ impl InstantElectionProvider for MockFallback {
|
||||
max_voters,
|
||||
max_targets,
|
||||
)
|
||||
.map_err(|_| "UnboundedExecution failed")
|
||||
.map_err(|_| "onchain::UnboundedExecution failed.")
|
||||
} else {
|
||||
super::NoFallback::<Runtime>::elect_with_bounds(max_voters, max_targets)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user