File tree 4 files changed +9
-17
lines changed
4 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -167,10 +167,6 @@ pub mod module {
167
167
FailedToSchedule ,
168
168
/// Failed to cancel a task.
169
169
FailedToCancel ,
170
- /// Failed to fast track a task.
171
- FailedToFastTrack ,
172
- /// Failed to delay a task.
173
- FailedToDelay ,
174
170
}
175
171
176
172
#[ pallet:: event]
@@ -285,8 +281,7 @@ pub mod module {
285
281
} ;
286
282
287
283
T :: AuthorityConfig :: check_fast_track_schedule ( origin, & initial_origin, new_delay) ?;
288
- T :: Scheduler :: reschedule_named ( ( & initial_origin, task_id) . encode ( ) , when)
289
- . map_err ( |_| Error :: < T > :: FailedToFastTrack ) ?;
284
+ T :: Scheduler :: reschedule_named ( ( & initial_origin, task_id) . encode ( ) , when) ?;
290
285
291
286
Self :: deposit_event ( Event :: FastTracked ( initial_origin, task_id, dispatch_at) ) ;
292
287
Ok ( ( ) . into ( ) )
@@ -305,8 +300,7 @@ pub mod module {
305
300
T :: Scheduler :: reschedule_named (
306
301
( & initial_origin, task_id) . encode ( ) ,
307
302
DispatchTime :: After ( additional_delay) ,
308
- )
309
- . map_err ( |_| Error :: < T > :: FailedToDelay ) ?;
303
+ ) ?;
310
304
311
305
let now = frame_system:: Pallet :: < T > :: block_number ( ) ;
312
306
let dispatch_at = now. saturating_add ( additional_delay) ;
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ impl ExtBuilder {
167
167
. unwrap ( ) ;
168
168
169
169
orml_tokens:: GenesisConfig :: < Runtime > {
170
- endowed_accounts : self
170
+ balances : self
171
171
. endowed_accounts
172
172
. into_iter ( )
173
173
. filter ( |( _, currency_id, _) | * currency_id != NATIVE_CURRENCY_ID )
Original file line number Diff line number Diff line change @@ -262,15 +262,13 @@ pub mod module {
262
262
263
263
#[ pallet:: genesis_config]
264
264
pub struct GenesisConfig < T : Config > {
265
- pub endowed_accounts : Vec < ( T :: AccountId , T :: CurrencyId , T :: Balance ) > ,
265
+ pub balances : Vec < ( T :: AccountId , T :: CurrencyId , T :: Balance ) > ,
266
266
}
267
267
268
268
#[ cfg( feature = "std" ) ]
269
269
impl < T : Config > Default for GenesisConfig < T > {
270
270
fn default ( ) -> Self {
271
- GenesisConfig {
272
- endowed_accounts : vec ! [ ] ,
273
- }
271
+ GenesisConfig { balances : vec ! [ ] }
274
272
}
275
273
}
276
274
@@ -279,16 +277,16 @@ pub mod module {
279
277
fn build ( & self ) {
280
278
// ensure no duplicates exist.
281
279
let unique_endowed_accounts = self
282
- . endowed_accounts
280
+ . balances
283
281
. iter ( )
284
282
. map ( |( account_id, currency_id, _) | ( account_id, currency_id) )
285
283
. collect :: < std:: collections:: BTreeSet < _ > > ( ) ;
286
284
assert ! (
287
- unique_endowed_accounts. len( ) == self . endowed_accounts . len( ) ,
285
+ unique_endowed_accounts. len( ) == self . balances . len( ) ,
288
286
"duplicate endowed accounts in genesis."
289
287
) ;
290
288
291
- self . endowed_accounts
289
+ self . balances
292
290
. iter ( )
293
291
. for_each ( |( account_id, currency_id, initial_balance) | {
294
292
assert ! (
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ impl ExtBuilder {
274
274
. unwrap ( ) ;
275
275
276
276
tokens:: GenesisConfig :: < Runtime > {
277
- endowed_accounts : self . endowed_accounts ,
277
+ balances : self . endowed_accounts ,
278
278
}
279
279
. assimilate_storage ( & mut t)
280
280
. unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments