Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Bags-list tests don't compile #14033

Closed
2 tasks done
Szegoo opened this issue Apr 27, 2023 · 0 comments · Fixed by #14047
Closed
2 tasks done

Bags-list tests don't compile #14033

Szegoo opened this issue Apr 27, 2023 · 0 comments · Fixed by #14047

Comments

@Szegoo
Copy link
Contributor

Szegoo commented Apr 27, 2023

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

When running: cargo test -p pallet-bags-list the following error occurs:

error[E0407]: method `set_score_of` is not a member of trait `frame_election_provider_support::ScoreProvider`
  --> frame/bags-list/src/mock.rs:44:2
   |
44 | /     fn set_score_of(id: &AccountId, weight: Self::Score) {
45 | |         NEXT_VOTE_WEIGHT_MAP.with(|m| m.borrow_mut().insert(*id, ...
46 | |     }
   | |_____^ not a member of trait `frame_election_provider_support::ScoreProvider`

warning: unused import: `frame_election_provider_support::ScoreProvider`
  --> frame/bags-list/src/benchmarks.rs:25:5
   |
25 | use frame_election_provider_support::ScoreProvider;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

error[E0599]: no function or associated item named `set_score_of` found for associated type `<T as Config<I>>::ScoreProvider` in the current scope
  --> frame/bags-list/src/benchmarks.rs:75:21
   |
75 |         T::ScoreProvider::set_score_of(&origin_middle, dest_bag_thresh);
   |                           ^^^^^^^^^^^^ function or associated item not found in `<T as Config<I>>::ScoreProvider`

error[E0599]: no function or associated item named `set_score_of` found for associated type `<T as Config<I>>::ScoreProvider` in the current scope
   --> frame/bags-list/src/benchmarks.rs:134:21
    |
134 |         T::ScoreProvider::set_score_of(&origin_tail, dest_bag_thresh);
    |                           ^^^^^^^^^^^^ function or associated item not found in `<T as Config<I>>::ScoreProvider`
.
.
.
And so on

Steps to reproduce

cargo test -p pallet-bags-list

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant