mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
Fast CompactAssignment search (#8385)
* use more efficient search through candidates in offchain-election * mark linear accessors as test-only in election-provider-multi-phase This prevents production code which uses them from compiling. Also write an efficient helper for getting the target index. * doc grammar * use faster target_index_fn in benchmarks * unbox helper functions * remove unnecessary import * write lifetime after primary trait Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
15e15e7d8e
commit
05f24931a9
@@ -145,7 +145,7 @@ impl<T: Config> Pallet<T> {
|
||||
// closures.
|
||||
let cache = helpers::generate_voter_cache::<T>(&voters);
|
||||
let voter_index = helpers::voter_index_fn::<T>(&cache);
|
||||
let target_index = helpers::target_index_fn_linear::<T>(&targets);
|
||||
let target_index = helpers::target_index_fn::<T>(&targets);
|
||||
let voter_at = helpers::voter_at_fn::<T>(&voters);
|
||||
let target_at = helpers::target_at_fn::<T>(&targets);
|
||||
let stake_of = helpers::stake_of_fn::<T>(&voters, &cache);
|
||||
|
||||
Reference in New Issue
Block a user