mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 12:37:57 +00:00
remove the uselsss weight return type from election provider API (#9569)
* remove the uselsss weight return type from election provider API * fix everything, should be ready for final benchmark * simplify on_init a bit furhter * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * remove unwraps * fmt * Update lock file * whitelist block weight * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * fix warning Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
@@ -1903,7 +1903,7 @@ fn bond_with_duplicate_vote_should_be_ignored_by_election_provider() {
|
||||
|
||||
// winners should be 21 and 31. Otherwise this election is taking duplicates into
|
||||
// account.
|
||||
let supports = <Test as Config>::ElectionProvider::elect().unwrap().0;
|
||||
let supports = <Test as Config>::ElectionProvider::elect().unwrap();
|
||||
assert_eq!(
|
||||
supports,
|
||||
vec![
|
||||
@@ -1947,7 +1947,7 @@ fn bond_with_duplicate_vote_should_be_ignored_by_election_provider_elected() {
|
||||
assert_ok!(Staking::nominate(Origin::signed(4), vec![21]));
|
||||
|
||||
// winners should be 21 and 11.
|
||||
let supports = <Test as Config>::ElectionProvider::elect().unwrap().0;
|
||||
let supports = <Test as Config>::ElectionProvider::elect().unwrap();
|
||||
assert_eq!(
|
||||
supports,
|
||||
vec![
|
||||
@@ -3826,7 +3826,6 @@ mod election_data_provider {
|
||||
ExtBuilder::default().nominate(false).build_and_execute(|| {
|
||||
assert!(<Validators<Test>>::iter().map(|(x, _)| x).all(|v| Staking::voters(None)
|
||||
.unwrap()
|
||||
.0
|
||||
.into_iter()
|
||||
.find(|(w, _, t)| { v == *w && t[0] == *w })
|
||||
.is_some()))
|
||||
@@ -3840,7 +3839,6 @@ mod election_data_provider {
|
||||
assert_eq!(
|
||||
<Staking as ElectionDataProvider<AccountId, BlockNumber>>::voters(None)
|
||||
.unwrap()
|
||||
.0
|
||||
.iter()
|
||||
.find(|x| x.0 == 101)
|
||||
.unwrap()
|
||||
@@ -3856,7 +3854,6 @@ mod election_data_provider {
|
||||
assert_eq!(
|
||||
<Staking as ElectionDataProvider<AccountId, BlockNumber>>::voters(None)
|
||||
.unwrap()
|
||||
.0
|
||||
.iter()
|
||||
.find(|x| x.0 == 101)
|
||||
.unwrap()
|
||||
@@ -3869,7 +3866,6 @@ mod election_data_provider {
|
||||
assert_eq!(
|
||||
<Staking as ElectionDataProvider<AccountId, BlockNumber>>::voters(None)
|
||||
.unwrap()
|
||||
.0
|
||||
.iter()
|
||||
.find(|x| x.0 == 101)
|
||||
.unwrap()
|
||||
|
||||
Reference in New Issue
Block a user