-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fixup some wrong dependencies #12899
Changes from all commits
ed04676
6e90b77
f0ef0da
8085d07
d5bc5b8
0566d7b
638917f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1338,7 +1338,7 @@ impl<T: Config> ScoreProvider<T::AccountId> for Pallet<T> { | |
| Self::weight_of(who) | ||
| } | ||
|
|
||
| #[cfg(any(feature = "runtime-benchmarks", feature = "fuzz"))] | ||
| #[cfg(feature = "runtime-benchmarks")] | ||
| fn set_score_of(who: &T::AccountId, weight: Self::Score) { | ||
| // this will clearly results in an inconsistent state, but it should not matter for a | ||
| // benchmark. | ||
|
|
@@ -1603,28 +1603,27 @@ impl<T: Config> StakingInterface for Pallet<T> { | |
| Self::nominate(RawOrigin::Signed(ctrl).into(), targets) | ||
| } | ||
|
|
||
| #[cfg(feature = "runtime-benchmarks")] | ||
| fn nominations(who: Self::AccountId) -> Option<Vec<T::AccountId>> { | ||
| Nominators::<T>::get(who).map(|n| n.targets.into_inner()) | ||
| } | ||
| sp_staking::runtime_benchmarks_enabled! { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is more verbose now, what's the benefit?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Before you required that someone also enabled the |
||
| fn nominations(who: Self::AccountId) -> Option<Vec<T::AccountId>> { | ||
| Nominators::<T>::get(who).map(|n| n.targets.into_inner()) | ||
| } | ||
|
|
||
| #[cfg(feature = "runtime-benchmarks")] | ||
| fn add_era_stakers( | ||
| current_era: &EraIndex, | ||
| stash: &T::AccountId, | ||
| exposures: Vec<(Self::AccountId, Self::Balance)>, | ||
| ) { | ||
| let others = exposures | ||
| .iter() | ||
| .map(|(who, value)| IndividualExposure { who: who.clone(), value: value.clone() }) | ||
| .collect::<Vec<_>>(); | ||
| let exposure = Exposure { total: Default::default(), own: Default::default(), others }; | ||
| Self::add_era_stakers(current_era.clone(), stash.clone(), exposure) | ||
| } | ||
| fn add_era_stakers( | ||
| current_era: &EraIndex, | ||
| stash: &T::AccountId, | ||
| exposures: Vec<(Self::AccountId, Self::Balance)>, | ||
| ) { | ||
| let others = exposures | ||
| .iter() | ||
| .map(|(who, value)| IndividualExposure { who: who.clone(), value: value.clone() }) | ||
| .collect::<Vec<_>>(); | ||
| let exposure = Exposure { total: Default::default(), own: Default::default(), others }; | ||
| <ErasStakers<T>>::insert(¤t_era, &stash, &exposure); | ||
| } | ||
|
|
||
| #[cfg(feature = "runtime-benchmarks")] | ||
| fn set_current_era(era: EraIndex) { | ||
| CurrentEra::<T>::put(era); | ||
| fn set_current_era(era: EraIndex) { | ||
| CurrentEra::<T>::put(era); | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.