@@ -263,7 +263,14 @@ mod remote_tests {
263
263
transport,
264
264
state_snapshot : maybe_state_snapshot. clone ( ) ,
265
265
child_trie : false ,
266
- pallets : vec ! [ "Staking" . into( ) , "System" . into( ) , "Balances" . into( ) ] ,
266
+ pallets : vec ! [
267
+ "Staking" . into( ) ,
268
+ "System" . into( ) ,
269
+ "Balances" . into( ) ,
270
+ "NominationPools" . into( ) ,
271
+ "DelegatedStaking" . into( ) ,
272
+ "VoterList" . into( ) ,
273
+ ] ,
267
274
..Default :: default ( )
268
275
} ;
269
276
let mut ext = Builder :: < Block > :: default ( )
@@ -288,7 +295,9 @@ mod remote_tests {
288
295
let mut err = 0 ;
289
296
let mut no_migration_needed = 0 ;
290
297
let mut force_withdraw_acc = 0 ;
291
- // iterate over all pools
298
+ let mut force_withdraw_count = 0 ;
299
+ let mut max_force_withdraw = 0 ;
300
+ // iterate over all stakers
292
301
pallet_staking:: Ledger :: < Runtime > :: iter ( ) . for_each ( |( ctrl, ledger) | {
293
302
match pallet_staking:: Pallet :: < Runtime > :: migrate_currency (
294
303
RuntimeOrigin :: signed ( alice. clone ( ) ) . into ( ) ,
@@ -300,7 +309,9 @@ mod remote_tests {
300
309
let force_withdraw = ledger. total - updated_ledger. total ;
301
310
if force_withdraw > 0 {
302
311
force_withdraw_acc += force_withdraw;
303
- log:: info!( target: "remote_test" , "Force withdraw from stash {:?}: value {:?}" , ledger. stash, force_withdraw) ;
312
+ force_withdraw_count += 1 ;
313
+ max_force_withdraw = max_force_withdraw. max ( force_withdraw) ;
314
+ log:: debug!( target: "remote_test" , "Force withdraw from stash {:?}: value {:?}" , ledger. stash, force_withdraw) ;
304
315
}
305
316
success += 1 ;
306
317
} ,
@@ -317,10 +328,12 @@ mod remote_tests {
317
328
318
329
log:: info!(
319
330
target: "remote_test" ,
320
- "Migration stats: success: {}, err: {}, total force withdrawn stake: {}, no_migration_needed: {}" ,
331
+ "Migration stats: success: {}, err: {}, total force withdrawn stake: {}, count {}, maximum amount {}, no_migration_needed: {}" ,
321
332
success,
322
333
err,
323
334
force_withdraw_acc,
335
+ force_withdraw_count,
336
+ max_force_withdraw,
324
337
no_migration_needed
325
338
) ;
326
339
} ) ;
0 commit comments