Skip to content

Commit f0534f1

Browse files
committed
Fix merge conflicts
1 parent 456665c commit f0534f1

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

pallets/subtensor/src/tests/move_stake.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,6 @@ fn test_do_swap_success() {
10791079
let origin_netuid = add_dynamic_network(&subnet_owner_hotkey, &subnet_owner_coldkey);
10801080
let destination_netuid = add_dynamic_network(&subnet_owner_hotkey, &subnet_owner_coldkey);
10811081

1082-
let fee = DefaultMinStake::<Test>::get();
1083-
10841082
let coldkey = U256::from(1);
10851083
let hotkey = U256::from(2);
10861084
let stake_amount = DefaultMinStake::<Test>::get() * 10;
@@ -1265,8 +1263,6 @@ fn test_do_swap_same_subnet() {
12651263
let subnet_owner_hotkey = U256::from(1101);
12661264
let netuid = add_dynamic_network(&subnet_owner_hotkey, &subnet_owner_coldkey);
12671265

1268-
let fee = DefaultMinStake::<Test>::get();
1269-
12701266
let coldkey = U256::from(1);
12711267
let hotkey = U256::from(2);
12721268
let stake_amount = DefaultMinStake::<Test>::get() * 10;
@@ -1291,8 +1287,8 @@ fn test_do_swap_same_subnet() {
12911287
SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet(&hotkey, &coldkey, netuid);
12921288
assert_abs_diff_eq!(
12931289
alpha_after,
1294-
alpha_before - fee,
1295-
epsilon = alpha_after / 1000
1290+
alpha_before - fee_as_alpha,
1291+
epsilon = alpha_after / 10000
12961292
);
12971293
});
12981294
}
@@ -1305,8 +1301,6 @@ fn test_do_swap_partial_stake() {
13051301
let origin_netuid = add_dynamic_network(&subnet_owner_hotkey, &subnet_owner_coldkey);
13061302
let destination_netuid = add_dynamic_network(&subnet_owner_hotkey, &subnet_owner_coldkey);
13071303

1308-
let fee = DefaultMinStake::<Test>::get();
1309-
13101304
let coldkey = U256::from(1);
13111305
let hotkey = U256::from(2);
13121306
let total_stake = DefaultMinStake::<Test>::get() * 10;
@@ -1354,8 +1348,6 @@ fn test_do_swap_storage_updates() {
13541348
let origin_netuid = add_dynamic_network(&subnet_owner_hotkey, &subnet_owner_coldkey);
13551349
let destination_netuid = add_dynamic_network(&subnet_owner_hotkey, &subnet_owner_coldkey);
13561350

1357-
let fee = DefaultMinStake::<Test>::get();
1358-
13591351
let coldkey = U256::from(1);
13601352
let hotkey = U256::from(2);
13611353
let stake_amount = DefaultMinStake::<Test>::get() * 10;
@@ -1408,8 +1400,6 @@ fn test_do_swap_multiple_times() {
14081400
let netuid1 = add_dynamic_network(&subnet_owner_hotkey, &subnet_owner_coldkey);
14091401
let netuid2 = add_dynamic_network(&subnet_owner_hotkey, &subnet_owner_coldkey);
14101402

1411-
let fee = DefaultMinStake::<Test>::get();
1412-
14131403
let coldkey = U256::from(1);
14141404
let hotkey = U256::from(2);
14151405
let initial_stake = DefaultMinStake::<Test>::get() * 10;
@@ -1459,8 +1449,8 @@ fn test_do_swap_multiple_times() {
14591449
let expected_stake = initial_stake - total_alpha1_fee;
14601450
assert_abs_diff_eq!(
14611451
final_stake_netuid1,
1462-
initial_stake - 6 * fee,
1463-
epsilon = initial_stake / 1000
1452+
expected_stake,
1453+
epsilon = initial_stake / 10000
14641454
);
14651455
assert_eq!(final_stake_netuid2, 0);
14661456
});

0 commit comments

Comments
 (0)