@@ -21,15 +21,15 @@ use frame_support::{
2121 assert_noop, assert_ok, derive_impl, hypothetically, ord_parameter_types,
2222 pallet_prelude:: Weight ,
2323 parameter_types,
24- traits:: { ConstU16 , EitherOf , IsInVec , MapSuccess , PollStatus , Polling , TryMapSuccess } ,
24+ traits:: { ConstU16 , EitherOf , IsInVec , MapSuccess , NoOpPoll , TryMapSuccess } ,
2525} ;
2626use frame_system:: EnsureSignedBy ;
27- use pallet_ranked_collective:: { EnsureRanked , Geometric , Rank , TallyOf , Votes } ;
27+ use pallet_ranked_collective:: { EnsureRanked , Geometric , Rank } ;
2828use sp_core:: { ConstU32 , Get } ;
2929use sp_runtime:: {
3030 bounded_vec,
3131 traits:: { Convert , ReduceBy , ReplaceWithDefault , TryMorphInto } ,
32- BuildStorage , DispatchError ,
32+ BuildStorage ,
3333} ;
3434type Class = Rank ;
3535
@@ -83,45 +83,6 @@ impl Config for Test {
8383 type MaxRank = ConstU32 < 9 > ;
8484}
8585
86- pub struct TestPolls ;
87- impl Polling < TallyOf < Test > > for TestPolls {
88- type Index = u8 ;
89- type Votes = Votes ;
90- type Moment = u64 ;
91- type Class = Class ;
92-
93- fn classes ( ) -> Vec < Self :: Class > {
94- unimplemented ! ( )
95- }
96- fn as_ongoing ( _: u8 ) -> Option < ( TallyOf < Test > , Self :: Class ) > {
97- unimplemented ! ( )
98- }
99- fn access_poll < R > (
100- _: Self :: Index ,
101- _: impl FnOnce ( PollStatus < & mut TallyOf < Test > , Self :: Moment , Self :: Class > ) -> R ,
102- ) -> R {
103- unimplemented ! ( )
104- }
105- fn try_access_poll < R > (
106- _: Self :: Index ,
107- _: impl FnOnce (
108- PollStatus < & mut TallyOf < Test > , Self :: Moment , Self :: Class > ,
109- ) -> Result < R , DispatchError > ,
110- ) -> Result < R , DispatchError > {
111- unimplemented ! ( )
112- }
113-
114- #[ cfg( feature = "runtime-benchmarks" ) ]
115- fn create_ongoing ( _: Self :: Class ) -> Result < Self :: Index , ( ) > {
116- unimplemented ! ( )
117- }
118-
119- #[ cfg( feature = "runtime-benchmarks" ) ]
120- fn end_ongoing ( _: Self :: Index , _: bool ) -> Result < ( ) , ( ) > {
121- unimplemented ! ( )
122- }
123- }
124-
12586/// Convert the tally class into the minimum rank required to vote on the poll.
12687/// MinRank(Class) = Class - Delta
12788pub struct MinRankOfClass < Delta > ( PhantomData < Delta > ) ;
@@ -154,7 +115,7 @@ impl pallet_ranked_collective::Config for Test {
154115 // Members can exchange up to the rank of 2 below them.
155116 MapSuccess < EnsureRanked < Test , ( ) , 2 > , ReduceBy < ConstU16 < 2 > > > ,
156117 > ;
157- type Polls = TestPolls ;
118+ type Polls = NoOpPoll ;
158119 type MinRankOfClass = MinRankOfClass < MinRankOfClassDelta > ;
159120 type MemberSwappedHandler = CoreFellowship ;
160121 type VoteWeight = Geometric ;
0 commit comments