polkadot-sdk icon indicating copy to clipboard operation
polkadot-sdk copied to clipboard

Fix benchmark failure in pallet-membership when it's used on its own

Open aliXsed opened this issue 6 months ago • 0 comments

Is there an existing issue?

  • [X] I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • [X] This is not a support question.

Description of bug

Several benchmarks try to verify assert!(<T::MembershipChanged>::get_prime().is_some()). This is while the default implementation of ChangeMembers for the unit struct would always return None. There are valid situations where the membership pallet could be used on its own without being paired to another (collective) pallet for example. In such situations it will make sense to have type MembershipChanged = ();. The benchmark however should not fail for this configuration.

Steps to reproduce

No response

aliXsed avatar Aug 14 '24 02:08 aliXsed