mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 16:07:57 +00:00
Fix offchain election to respect the weight (#7215)
* Mockup * Fix offchain election to respect the weight * Fix builds a bit * Update frame/staking/src/offchain_election.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/staking/src/offchain_election.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Make it build, binary search * Fix a number of grumbles * one more fix. * remove unwrap. * better alg. * Better alg again. * Final fixes * Fix * Rollback to normal * Final touches. * Better tests. * Update frame/staking/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Proper maxExtWeight * Final fix * Final fix for the find_voter Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -3100,7 +3100,7 @@ mod offchain_election {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore] // This takes a few mins
|
||||
#[ignore]
|
||||
fn offchain_wont_work_if_snapshot_fails() {
|
||||
ExtBuilder::default()
|
||||
.offchain_election_ext()
|
||||
@@ -3382,8 +3382,8 @@ mod offchain_election {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn offchain_worker_runs_with_equalise() {
|
||||
// Offchain worker equalises based on the number provided by randomness. See the difference
|
||||
fn offchain_worker_runs_with_balancing() {
|
||||
// Offchain worker balances based on the number provided by randomness. See the difference
|
||||
// in the priority, which comes from the computed score.
|
||||
let mut ext = ExtBuilder::default()
|
||||
.offchain_election_ext()
|
||||
|
||||
Reference in New Issue
Block a user