@@ -43,6 +43,10 @@ fn add_proxies<T: Config>(n: u32, maybe_who: Option<T::AccountId>) -> Result<(),
43
43
BlockNumberFor :: < T > :: zero ( ) ,
44
44
) ?;
45
45
}
46
+ T :: ProxyConsideration :: ensure_successful (
47
+ & caller,
48
+ Footprint :: from_mel :: < ( ProxiesVec < T > , ProxyTicketOf < T > ) > ( ) ,
49
+ ) ;
46
50
Ok ( ( ) )
47
51
}
48
52
@@ -63,6 +67,10 @@ fn add_announcements<T: Config>(
63
67
T :: ProxyType :: default ( ) ,
64
68
BlockNumberFor :: < T > :: zero ( ) ,
65
69
) ?;
70
+ T :: ProxyConsideration :: ensure_successful (
71
+ & real,
72
+ Footprint :: from_mel :: < ( ProxiesVec < T > , ProxyTicketOf < T > ) > ( ) ,
73
+ ) ;
66
74
real
67
75
} ;
68
76
let real_lookup = T :: Lookup :: unlookup ( real) ;
@@ -73,6 +81,10 @@ fn add_announcements<T: Config>(
73
81
T :: CallHasher :: hash_of ( & ( "add_announcement" , n) ) ,
74
82
) ?;
75
83
}
84
+ T :: AnnouncementConsideration :: ensure_successful (
85
+ & caller,
86
+ Footprint :: from_mel :: < ( AnnouncementsVec < T > , AnnouncementTicketOf < T > ) > ( ) ,
87
+ ) ;
76
88
Ok ( ( ) )
77
89
}
78
90
@@ -108,6 +120,7 @@ benchmarks! {
108
120
real_lookup. clone( ) ,
109
121
T :: CallHasher :: hash_of( & call) ,
110
122
) ?;
123
+ T :: AnnouncementConsideration :: ensure_successful( & delegate, Footprint :: from_mel:: <( AnnouncementsVec <T >, AnnouncementTicketOf <T >) >( ) ) ;
111
124
add_announcements:: <T >( a, Some ( delegate. clone( ) ) , None ) ?;
112
125
} : _( RawOrigin :: Signed ( caller) , delegate_lookup, real_lookup, Some ( T :: ProxyType :: default ( ) ) , Box :: new( call) )
113
126
verify {
@@ -128,6 +141,7 @@ benchmarks! {
128
141
real_lookup. clone( ) ,
129
142
T :: CallHasher :: hash_of( & call) ,
130
143
) ?;
144
+ T :: AnnouncementConsideration :: ensure_successful( & caller, Footprint :: from_mel:: <( AnnouncementsVec <T >, AnnouncementTicketOf <T >) >( ) ) ;
131
145
add_announcements:: <T >( a, Some ( caller. clone( ) ) , None ) ?;
132
146
} : _( RawOrigin :: Signed ( caller. clone( ) ) , real_lookup, T :: CallHasher :: hash_of( & call) )
133
147
verify {
@@ -150,6 +164,7 @@ benchmarks! {
150
164
real_lookup,
151
165
T :: CallHasher :: hash_of( & call) ,
152
166
) ?;
167
+ T :: AnnouncementConsideration :: ensure_successful( & caller, Footprint :: from_mel:: <( AnnouncementsVec <T >, AnnouncementTicketOf <T >) >( ) ) ;
153
168
add_announcements:: <T >( a, Some ( caller. clone( ) ) , None ) ?;
154
169
} : _( RawOrigin :: Signed ( real) , caller_lookup, T :: CallHasher :: hash_of( & call) )
155
170
verify {
@@ -177,6 +192,7 @@ benchmarks! {
177
192
let p in 1 .. ( T :: MaxProxies :: get( ) - 1 ) => add_proxies:: <T >( p, None ) ?;
178
193
let caller: T :: AccountId = whitelisted_caller( ) ;
179
194
let real = T :: Lookup :: unlookup( account( "target" , T :: MaxProxies :: get( ) , SEED ) ) ;
195
+ T :: ProxyConsideration :: ensure_successful( & caller, Footprint :: from_mel:: <( ProxiesVec <T >, ProxyTicketOf <T >) >( ) ) ;
180
196
} : _(
181
197
RawOrigin :: Signed ( caller. clone( ) ) ,
182
198
real,
@@ -215,6 +231,7 @@ benchmarks! {
215
231
create_pure {
216
232
let p in 1 .. ( T :: MaxProxies :: get( ) - 1 ) => add_proxies:: <T >( p, None ) ?;
217
233
let caller: T :: AccountId = whitelisted_caller( ) ;
234
+ T :: ProxyConsideration :: ensure_successful( & caller, Footprint :: from_mel:: <( ProxiesVec <T >, ProxyTicketOf <T >) >( ) ) ;
218
235
} : _(
219
236
RawOrigin :: Signed ( caller. clone( ) ) ,
220
237
T :: ProxyType :: default ( ) ,
@@ -237,11 +254,12 @@ benchmarks! {
237
254
let caller: T :: AccountId = whitelisted_caller( ) ;
238
255
let caller_lookup = T :: Lookup :: unlookup( caller. clone( ) ) ;
239
256
Pallet :: <T >:: create_pure(
240
- RawOrigin :: Signed ( whitelisted_caller ( ) ) . into( ) ,
257
+ RawOrigin :: Signed ( caller . clone ( ) ) . into( ) ,
241
258
T :: ProxyType :: default ( ) ,
242
259
BlockNumberFor :: <T >:: zero( ) ,
243
260
0
244
261
) ?;
262
+ T :: ProxyConsideration :: ensure_successful( & caller, Footprint :: from_mel:: <( ProxiesVec <T >, ProxyTicketOf <T >) >( ) ) ;
245
263
let height = system:: Pallet :: <T >:: block_number( ) ;
246
264
let ext_index = system:: Pallet :: <T >:: extrinsic_index( ) . unwrap_or( 0 ) ;
247
265
let pure_account = Pallet :: <T >:: pure_account( & caller, & T :: ProxyType :: default ( ) , 0 , None ) ;
0 commit comments