@@ -76,6 +76,30 @@ pub type MemberCount = u32;
76
76
/// + This pallet assumes that dependents keep to the limit without enforcing it.
77
77
pub const MAX_MEMBERS : MemberCount = 100 ;
78
78
79
+ pub trait WeightInfo {
80
+ fn set_members ( m : u32 , n : u32 , p : u32 , ) -> Weight ;
81
+ fn execute ( m : u32 , b : u32 , ) -> Weight ;
82
+ fn propose_execute ( m : u32 , b : u32 , ) -> Weight ;
83
+ fn propose_proposed ( m : u32 , p : u32 , b : u32 , ) -> Weight ;
84
+ fn vote ( m : u32 , ) -> Weight ;
85
+ fn close_early_disapproved ( m : u32 , p : u32 , b : u32 , ) -> Weight ;
86
+ fn close_early_approved ( m : u32 , p : u32 , b : u32 , ) -> Weight ;
87
+ fn close_disapproved ( m : u32 , p : u32 , b : u32 , ) -> Weight ;
88
+ fn close_approved ( m : u32 , p : u32 , b : u32 , ) -> Weight ;
89
+ }
90
+
91
+ impl WeightInfo for ( ) {
92
+ fn set_members ( _m : u32 , _n : u32 , _p : u32 , ) -> Weight { 1_000_000_000 }
93
+ fn execute ( _m : u32 , _b : u32 , ) -> Weight { 1_000_000_000 }
94
+ fn propose_execute ( _m : u32 , _b : u32 , ) -> Weight { 1_000_000_000 }
95
+ fn propose_proposed ( _m : u32 , _p : u32 , _b : u32 , ) -> Weight { 1_000_000_000 }
96
+ fn vote ( _m : u32 , ) -> Weight { 1_000_000_000 }
97
+ fn close_early_disapproved ( _m : u32 , _p : u32 , _b : u32 , ) -> Weight { 1_000_000_000 }
98
+ fn close_early_approved ( _m : u32 , _p : u32 , _b : u32 , ) -> Weight { 1_000_000_000 }
99
+ fn close_disapproved ( _m : u32 , _p : u32 , _b : u32 , ) -> Weight { 1_000_000_000 }
100
+ fn close_approved ( _m : u32 , _p : u32 , _b : u32 , ) -> Weight { 1_000_000_000 }
101
+ }
102
+
79
103
pub trait Trait < I : Instance =DefaultInstance > : frame_system:: Trait {
80
104
/// The outer origin type.
81
105
type Origin : From < RawOrigin < Self :: AccountId , I > > ;
@@ -94,6 +118,9 @@ pub trait Trait<I: Instance=DefaultInstance>: frame_system::Trait {
94
118
95
119
/// Maximum number of proposals allowed to be active in parallel.
96
120
type MaxProposals : Get < u32 > ;
121
+
122
+ /// Weight information for extrinsics in this pallet.
123
+ type WeightInfo : WeightInfo ;
97
124
}
98
125
99
126
/// Origin for the collective module.
@@ -1039,20 +1066,23 @@ mod tests {
1039
1066
type AccountData = ( ) ;
1040
1067
type OnNewAccount = ( ) ;
1041
1068
type OnKilledAccount = ( ) ;
1069
+ type SystemWeightInfo = ( ) ;
1042
1070
}
1043
1071
impl Trait < Instance1 > for Test {
1044
1072
type Origin = Origin ;
1045
1073
type Proposal = Call ;
1046
1074
type Event = Event ;
1047
1075
type MotionDuration = MotionDuration ;
1048
1076
type MaxProposals = MaxProposals ;
1077
+ type WeightInfo = ( ) ;
1049
1078
}
1050
1079
impl Trait for Test {
1051
1080
type Origin = Origin ;
1052
1081
type Proposal = Call ;
1053
1082
type Event = Event ;
1054
1083
type MotionDuration = MotionDuration ;
1055
1084
type MaxProposals = MaxProposals ;
1085
+ type WeightInfo = ( ) ;
1056
1086
}
1057
1087
1058
1088
pub type Block = sp_runtime:: generic:: Block < Header , UncheckedExtrinsic > ;
0 commit comments