Skip to content

Commit 77f0375

Browse files
committed
Fix remaining tests
1 parent de5d1cb commit 77f0375

File tree

3 files changed

+31
-31
lines changed

3 files changed

+31
-31
lines changed

pallets/subtensor/src/tests/move_stake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,4 +772,4 @@ fn test_moving_too_little_fails() {
772772
Error::<Test>::AmountTooLow
773773
);
774774
});
775-
}
775+
}

pallets/subtensor/src/tests/swap_coldkey.rs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fn test_swap_total_coldkey_stake() {
101101
let other_coldkey = U256::from(3);
102102
let hotkey = U256::from(4);
103103
let other_hotkey = U256::from(5);
104-
let stake = 100;
104+
let stake = 10_000;
105105

106106
let netuid = 1u16;
107107
add_network(netuid, 1, 0);
@@ -1234,13 +1234,13 @@ fn test_coldkey_swap_total() {
12341234
let netuid1 = 1u16;
12351235
let netuid2 = 2u16;
12361236
let netuid3 = 3u16;
1237-
SubtensorModule::add_balance_to_coldkey_account(&coldkey, 1000);
1238-
SubtensorModule::add_balance_to_coldkey_account(&delegate1, 1000);
1239-
SubtensorModule::add_balance_to_coldkey_account(&delegate2, 1000);
1240-
SubtensorModule::add_balance_to_coldkey_account(&delegate3, 1000);
1241-
SubtensorModule::add_balance_to_coldkey_account(&nominator1, 1000);
1242-
SubtensorModule::add_balance_to_coldkey_account(&nominator2, 1000);
1243-
SubtensorModule::add_balance_to_coldkey_account(&nominator3, 1000);
1237+
SubtensorModule::add_balance_to_coldkey_account(&coldkey, 100_000);
1238+
SubtensorModule::add_balance_to_coldkey_account(&delegate1, 100_000);
1239+
SubtensorModule::add_balance_to_coldkey_account(&delegate2, 100_000);
1240+
SubtensorModule::add_balance_to_coldkey_account(&delegate3, 100_000);
1241+
SubtensorModule::add_balance_to_coldkey_account(&nominator1, 100_000);
1242+
SubtensorModule::add_balance_to_coldkey_account(&nominator2, 100_000);
1243+
SubtensorModule::add_balance_to_coldkey_account(&nominator3, 100_000);
12441244

12451245
// Setup initial state
12461246
add_network(netuid1, 13, 0);
@@ -1263,113 +1263,113 @@ fn test_coldkey_swap_total() {
12631263
<<Test as Config>::RuntimeOrigin>::signed(coldkey),
12641264
hotkey1,
12651265
netuid1,
1266-
100
1266+
10_000
12671267
));
12681268
assert_ok!(SubtensorModule::add_stake(
12691269
<<Test as Config>::RuntimeOrigin>::signed(coldkey),
12701270
hotkey2,
12711271
netuid1,
1272-
100
1272+
10_000
12731273
));
12741274
assert_ok!(SubtensorModule::add_stake(
12751275
<<Test as Config>::RuntimeOrigin>::signed(coldkey),
12761276
hotkey3,
12771277
netuid1,
1278-
100
1278+
10_000
12791279
));
12801280
assert_ok!(SubtensorModule::add_stake(
12811281
<<Test as Config>::RuntimeOrigin>::signed(coldkey),
12821282
delegate1,
12831283
netuid1,
1284-
100
1284+
10_000
12851285
));
12861286
assert_ok!(SubtensorModule::add_stake(
12871287
<<Test as Config>::RuntimeOrigin>::signed(coldkey),
12881288
delegate2,
12891289
netuid1,
1290-
100
1290+
10_000
12911291
));
12921292
assert_ok!(SubtensorModule::add_stake(
12931293
<<Test as Config>::RuntimeOrigin>::signed(coldkey),
12941294
delegate3,
12951295
netuid1,
1296-
100
1296+
10_000
12971297
));
12981298

12991299
assert_ok!(SubtensorModule::add_stake(
13001300
<<Test as Config>::RuntimeOrigin>::signed(delegate1),
13011301
hotkey1,
13021302
netuid1,
1303-
100
1303+
10_000
13041304
));
13051305
assert_ok!(SubtensorModule::add_stake(
13061306
<<Test as Config>::RuntimeOrigin>::signed(delegate2),
13071307
hotkey2,
13081308
netuid1,
1309-
100
1309+
10_000
13101310
));
13111311
assert_ok!(SubtensorModule::add_stake(
13121312
<<Test as Config>::RuntimeOrigin>::signed(delegate3),
13131313
hotkey3,
13141314
netuid1,
1315-
100
1315+
10_000
13161316
));
13171317

13181318
assert_ok!(SubtensorModule::add_stake(
13191319
<<Test as Config>::RuntimeOrigin>::signed(delegate1),
13201320
delegate1,
13211321
netuid1,
1322-
100
1322+
10_000
13231323
));
13241324
assert_ok!(SubtensorModule::add_stake(
13251325
<<Test as Config>::RuntimeOrigin>::signed(delegate2),
13261326
delegate2,
13271327
netuid1,
1328-
100
1328+
10_000
13291329
));
13301330
assert_ok!(SubtensorModule::add_stake(
13311331
<<Test as Config>::RuntimeOrigin>::signed(delegate3),
13321332
delegate3,
13331333
netuid1,
1334-
100
1334+
10_000
13351335
));
13361336

13371337
assert_ok!(SubtensorModule::add_stake(
13381338
<<Test as Config>::RuntimeOrigin>::signed(nominator1),
13391339
hotkey1,
13401340
netuid1,
1341-
100
1341+
10_000
13421342
));
13431343
assert_ok!(SubtensorModule::add_stake(
13441344
<<Test as Config>::RuntimeOrigin>::signed(nominator2),
13451345
hotkey2,
13461346
netuid1,
1347-
100
1347+
10_000
13481348
));
13491349
assert_ok!(SubtensorModule::add_stake(
13501350
<<Test as Config>::RuntimeOrigin>::signed(nominator3),
13511351
hotkey3,
13521352
netuid1,
1353-
100
1353+
10_000
13541354
));
13551355

13561356
assert_ok!(SubtensorModule::add_stake(
13571357
<<Test as Config>::RuntimeOrigin>::signed(nominator1),
13581358
delegate1,
13591359
netuid1,
1360-
100
1360+
10_000
13611361
));
13621362
assert_ok!(SubtensorModule::add_stake(
13631363
<<Test as Config>::RuntimeOrigin>::signed(nominator2),
13641364
delegate2,
13651365
netuid1,
1366-
100
1366+
10_000
13671367
));
13681368
assert_ok!(SubtensorModule::add_stake(
13691369
<<Test as Config>::RuntimeOrigin>::signed(nominator3),
13701370
delegate3,
13711371
netuid1,
1372-
100
1372+
10_000
13731373
));
13741374

13751375
assert_eq!(
@@ -1714,7 +1714,7 @@ fn test_schedule_swap_coldkey_execution() {
17141714
let new_coldkey = U256::from(2);
17151715
let hotkey = U256::from(3);
17161716
let netuid = 1u16;
1717-
let stake_amount = 100;
1717+
let stake_amount = 10_000;
17181718

17191719
add_network(netuid, 13, 0);
17201720
register_ok_neuron(netuid, hotkey, old_coldkey, 0);

pallets/subtensor/src/tests/weights.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn test_set_rootweights_validate() {
139139
RuntimeOrigin::signed(hotkey),
140140
hotkey,
141141
netuid,
142-
1
142+
10_000
143143
));
144144

145145
// Verify stake is more than minimum
@@ -253,7 +253,7 @@ fn test_commit_weights_validate() {
253253
RuntimeOrigin::signed(hotkey),
254254
hotkey,
255255
netuid,
256-
1
256+
10_000
257257
));
258258

259259
// Verify stake is more than minimum
@@ -433,7 +433,7 @@ fn test_reveal_weights_validate() {
433433
RuntimeOrigin::signed(hotkey),
434434
hotkey,
435435
netuid,
436-
1
436+
10_000
437437
));
438438

439439
// Verify stake is more than minimum

0 commit comments

Comments
 (0)