mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 17:11:02 +00:00
Fix Rust features (#11976)
* Add std feature Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * WIP Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Cleanup Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Impl function also in tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make compile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix sp-trie feature Something makes the bench regression guard fail, maybe this? Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add runtime-benchmarks feature to sc-service Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert "Fix sp-trie feature" This reverts commit f2cddfe41bc72e6f2f8133795ec9408ba0c3ec63. Was already fixed, only needed a CI retry. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
b1bbdf1192
commit
45966d509e
@@ -387,7 +387,7 @@ impl<T: Config<I>, I: 'static> ScoreProvider<T::AccountId> for Pallet<T, I> {
|
||||
Node::<T, I>::get(id).map(|node| node.score()).unwrap_or_default()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "runtime-benchmarks", test))]
|
||||
#[cfg(any(feature = "runtime-benchmarks", feature = "fuzz", test))]
|
||||
fn set_score_of(id: &T::AccountId, new_score: T::Score) {
|
||||
ListNodes::<T, I>::mutate(id, |maybe_node| {
|
||||
if let Some(node) = maybe_node.as_mut() {
|
||||
|
||||
@@ -882,7 +882,7 @@ impl<T: Config<I>, I: 'static> Node<T, I> {
|
||||
&self.id
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "runtime-benchmarks", test))]
|
||||
#[cfg(any(feature = "runtime-benchmarks", feature = "fuzz", test))]
|
||||
pub fn set_score(&mut self, s: T::Score) {
|
||||
self.score = s
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ impl frame_election_provider_support::ScoreProvider<AccountId> for StakingMock {
|
||||
*NextVoteWeightMap::get().get(id).unwrap_or(&NextVoteWeight::get())
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "runtime-benchmarks", test))]
|
||||
#[cfg(any(feature = "runtime-benchmarks", feature = "fuzz", test))]
|
||||
fn set_score_of(id: &AccountId, weight: Self::Score) {
|
||||
NEXT_VOTE_WEIGHT_MAP.with(|m| m.borrow_mut().insert(*id, weight));
|
||||
}
|
||||
@@ -108,6 +108,7 @@ pub struct ExtBuilder {
|
||||
skip_genesis_ids: bool,
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "runtime-benchmarks", feature = "fuzz", test))]
|
||||
impl ExtBuilder {
|
||||
/// Skip adding the default genesis ids to the list.
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user