File tree 2 files changed +11
-9
lines changed
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -156,14 +156,14 @@ benchmarks_instance_pallet! {
156
156
let bounty_update_period = T :: BountyUpdatePeriod :: get( ) ;
157
157
let inactivity_timeout = T :: SpendPeriod :: get( ) . saturating_add( bounty_update_period) ;
158
158
set_block_number:: <T , I >( inactivity_timeout. saturating_add( 2u32 . into( ) ) ) ;
159
- let caller: T :: AccountId = whitelisted_caller( ) ;
160
- let signed_caller: T :: RuntimeOrigin = RawOrigin :: Signed ( caller. clone( ) ) . into( ) ;
161
159
162
160
// If `BountyUpdatePeriod` overflows the inactivity timeout the benchmark still executes the slash
163
161
let origin = if Pallet :: <T , I >:: treasury_block_number( ) <= inactivity_timeout {
164
- T :: RejectOrigin :: try_successful_origin( ) . unwrap_or_else( |_| signed_caller)
162
+ let curator = T :: Lookup :: lookup( curator_lookup) . map_err( <& str >:: from) ?;
163
+ T :: RejectOrigin :: try_successful_origin( ) . unwrap_or_else( |_| RawOrigin :: Signed ( curator) . into( ) )
165
164
} else {
166
- signed_caller
165
+ let caller = whitelisted_caller( ) ;
166
+ RawOrigin :: Signed ( caller) . into( )
167
167
} ;
168
168
} : _<T :: RuntimeOrigin >( origin, bounty_id)
169
169
Original file line number Diff line number Diff line change @@ -277,15 +277,17 @@ mod benchmarks {
277
277
let bounty_update_period = T :: BountyUpdatePeriod :: get ( ) ;
278
278
let inactivity_timeout = T :: SpendPeriod :: get ( ) . saturating_add ( bounty_update_period) ;
279
279
set_block_number :: < T > ( inactivity_timeout. saturating_add ( 1u32 . into ( ) ) ) ;
280
- let caller: T :: AccountId = whitelisted_caller ( ) ;
281
- let signed_caller: T :: RuntimeOrigin = RawOrigin :: Signed ( caller. clone ( ) ) . into ( ) ;
282
280
283
281
// If `BountyUpdatePeriod` overflows the inactivity timeout the benchmark still
284
282
// executes the slash
285
- let origin = if Pallet :: < T > :: treasury_block_number ( ) <= inactivity_timeout {
286
- T :: RejectOrigin :: try_successful_origin ( ) . unwrap_or_else ( |_| signed_caller)
283
+ let origin: T :: RuntimeOrigin = if Pallet :: < T > :: treasury_block_number ( ) <= inactivity_timeout
284
+ {
285
+ let child_curator = bounty_setup. child_curator ;
286
+ T :: RejectOrigin :: try_successful_origin ( )
287
+ . unwrap_or_else ( |_| RawOrigin :: Signed ( child_curator) . into ( ) )
287
288
} else {
288
- signed_caller
289
+ let caller = whitelisted_caller ( ) ;
290
+ RawOrigin :: Signed ( caller) . into ( )
289
291
} ;
290
292
291
293
#[ extrinsic_call]
You can’t perform that action at this time.
0 commit comments