Skip to content

Commit

Permalink
fix(pallet-communities-manager): restore q counter in weights as u32
Browse files Browse the repository at this point in the history
  • Loading branch information
pandres95 committed May 31, 2024
1 parent a19504b commit 3c898a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pallets/communities-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pub mod pallet {
Ok(())
}

#[pallet::weight(<T as Config>::WeightInfo::create_memberships(*amount))]
#[pallet::weight(<T as Config>::WeightInfo::create_memberships((*amount).into()))]
#[pallet::call_index(1)]
pub fn create_memberships(
origin: OriginFor<T>,
Expand Down
6 changes: 3 additions & 3 deletions pallets/communities-manager/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use core::marker::PhantomData;
/// Weight functions needed for pallet_communities.
pub trait WeightInfo {
fn register() -> Weight;
fn create_memberships(q: u16, ) -> Weight;
fn create_memberships(q: u32, ) -> Weight;
}

/// Weights for pallet_communities using the Substrate node and recommended hardware.
Expand Down Expand Up @@ -65,7 +65,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Storage: `CommunityMemberships::ItemPriceOf` (r:0 w:1023)
/// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`)
/// The range of component `q` is `[1, 1024]`.
fn create_memberships(q: u16, ) -> Weight {
fn create_memberships(q: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `368`
// Estimated: `3547 + q * (3334 ±0)`
Expand Down Expand Up @@ -134,7 +134,7 @@ impl WeightInfo for () {
/// Storage: `CommunityMemberships::ItemPriceOf` (r:0 w:1023)
/// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`)
/// The range of component `q` is `[1, 1024]`.
fn create_memberships(q: u16, ) -> Weight {
fn create_memberships(q: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `368`
// Estimated: `3547 + q * (3334 ±0)`
Expand Down

0 comments on commit 3c898a2

Please sign in to comment.