Skip to content

Commit

Permalink
wip(pallet-communities): initial parmeters for benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
pandres95 committed Mar 8, 2024
1 parent 8edfc00 commit 898e729
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
10 changes: 0 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pallets/communities/src/benchmarking.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Benchmarking setup for pallet-communities
#![cfg(feature = "runtime-benchmarks")]
use self::types::{CommunityIdOf, PalletsOriginOf};

use super::*;

use self::{
Expand Down
5 changes: 5 additions & 0 deletions pallets/communities/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ pub mod pallet {
use sp_runtime::traits::StaticLookup;
use types::{PollIndexOf, *};

#[cfg(feature = "runtime-benchmarks")]
pub trait BenchmarkHelper<T: Config> {
fn get_community_id() -> CommunityIdOf<T>;
}

#[pallet::pallet]
pub struct Pallet<T>(_);

Expand Down
1 change: 1 addition & 0 deletions pallets/communities/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use frame_support::{
PalletId,
};
use frame_system::{EnsureRoot, EnsureRootWithSuccess, EnsureSigned};
use pallet_communities::{types::CommunityIdOf, BenchmarkHelper};
use pallet_referenda::{TrackIdOf, TrackInfoOf, TracksInfo};
use parity_scale_codec::Compact;
use sp_core::H256;
Expand Down

0 comments on commit 898e729

Please sign in to comment.