33mod mock;
44use frame_support:: assert_ok;
55use frame_system:: Config ;
6- use pallet_subtensor:: * ;
76use mock:: * ;
7+ use pallet_subtensor:: * ;
88use sp_core:: U256 ;
99
1010#[ test]
@@ -278,12 +278,11 @@ fn test_migration_delete_subnet_21() {
278278 } )
279279}
280280
281-
282281// SKIP_WASM_BUILD=1 RUST_LOG=info cargo test --test migration -- test_migrate_fix_total_coldkey_stake --exact --nocapture
283282#[ test]
284283fn test_migrate_fix_total_coldkey_stake ( ) {
285284 new_test_ext ( 1 ) . execute_with ( || {
286- let coldkey = U256 :: from ( 0 ) ;
285+ let coldkey = U256 :: from ( 0 ) ;
287286 TotalColdkeyStake :: < Test > :: insert ( coldkey, 0 ) ;
288287 StakingHotkeys :: < Test > :: insert ( coldkey, vec ! [ U256 :: from( 1 ) , U256 :: from( 2 ) , U256 :: from( 3 ) ] ) ;
289288 Stake :: < Test > :: insert ( U256 :: from ( 1 ) , U256 :: from ( 0 ) , 10000 ) ;
@@ -298,7 +297,7 @@ fn test_migrate_fix_total_coldkey_stake() {
298297#[ test]
299298fn test_migrate_fix_total_coldkey_stake_value_already_in_total ( ) {
300299 new_test_ext ( 1 ) . execute_with ( || {
301- let coldkey = U256 :: from ( 0 ) ;
300+ let coldkey = U256 :: from ( 0 ) ;
302301 TotalColdkeyStake :: < Test > :: insert ( coldkey, 100000000 ) ;
303302 StakingHotkeys :: < Test > :: insert ( coldkey, vec ! [ U256 :: from( 1 ) , U256 :: from( 2 ) , U256 :: from( 3 ) ] ) ;
304303 Stake :: < Test > :: insert ( U256 :: from ( 1 ) , U256 :: from ( 0 ) , 10000 ) ;
@@ -313,7 +312,7 @@ fn test_migrate_fix_total_coldkey_stake_value_already_in_total() {
313312#[ test]
314313fn test_migrate_fix_total_coldkey_stake_no_entry ( ) {
315314 new_test_ext ( 1 ) . execute_with ( || {
316- let coldkey = U256 :: from ( 0 ) ;
315+ let coldkey = U256 :: from ( 0 ) ;
317316 StakingHotkeys :: < Test > :: insert ( coldkey, vec ! [ U256 :: from( 1 ) , U256 :: from( 2 ) , U256 :: from( 3 ) ] ) ;
318317 Stake :: < Test > :: insert ( U256 :: from ( 1 ) , U256 :: from ( 0 ) , 10000 ) ;
319318 Stake :: < Test > :: insert ( U256 :: from ( 2 ) , U256 :: from ( 0 ) , 10000 ) ;
@@ -327,7 +326,7 @@ fn test_migrate_fix_total_coldkey_stake_no_entry() {
327326#[ test]
328327fn test_migrate_fix_total_coldkey_stake_no_entry_in_hotkeys ( ) {
329328 new_test_ext ( 1 ) . execute_with ( || {
330- let coldkey = U256 :: from ( 0 ) ;
329+ let coldkey = U256 :: from ( 0 ) ;
331330 TotalColdkeyStake :: < Test > :: insert ( coldkey, 100000000 ) ;
332331 StakingHotkeys :: < Test > :: insert ( coldkey, vec ! [ U256 :: from( 1 ) , U256 :: from( 2 ) , U256 :: from( 3 ) ] ) ;
333332 pallet_subtensor:: migration:: do_migrate_fix_total_coldkey_stake :: < Test > ( ) ;
@@ -339,7 +338,7 @@ fn test_migrate_fix_total_coldkey_stake_no_entry_in_hotkeys() {
339338#[ test]
340339fn test_migrate_fix_total_coldkey_stake_one_hotkey_stake_missing ( ) {
341340 new_test_ext ( 1 ) . execute_with ( || {
342- let coldkey = U256 :: from ( 0 ) ;
341+ let coldkey = U256 :: from ( 0 ) ;
343342 TotalColdkeyStake :: < Test > :: insert ( coldkey, 100000000 ) ;
344343 StakingHotkeys :: < Test > :: insert ( coldkey, vec ! [ U256 :: from( 1 ) , U256 :: from( 2 ) , U256 :: from( 3 ) ] ) ;
345344 Stake :: < Test > :: insert ( U256 :: from ( 1 ) , U256 :: from ( 0 ) , 10000 ) ;
@@ -348,5 +347,3 @@ fn test_migrate_fix_total_coldkey_stake_one_hotkey_stake_missing() {
348347 assert_eq ! ( TotalColdkeyStake :: <Test >:: get( coldkey) , 20000 ) ;
349348 } )
350349}
351-
352-
0 commit comments