Skip to content

Commit b733877

Browse files
committed
Fix tests that used 50% take
1 parent 19d9078 commit b733877

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

pallets/subtensor/tests/senate.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ fn test_senate_join_works() {
8787
coldkey_account_id
8888
);
8989

90-
// Lets make this new key a delegate with a 50% take.
90+
// Lets make this new key a delegate with a 10% take.
9191
assert_ok!(SubtensorModule::do_become_delegate(
9292
<<Test as Config>::RuntimeOrigin>::signed(coldkey_account_id),
9393
hotkey_account_id,
94-
u16::MAX / 2
94+
u16::MAX / 10
9595
));
9696

9797
let staker_coldkey = U256::from(7);
@@ -156,11 +156,11 @@ fn test_senate_vote_works() {
156156
coldkey_account_id
157157
);
158158

159-
// Lets make this new key a delegate with a 50% take.
159+
// Lets make this new key a delegate with a 10% take.
160160
assert_ok!(SubtensorModule::do_become_delegate(
161161
<<Test as Config>::RuntimeOrigin>::signed(coldkey_account_id),
162162
hotkey_account_id,
163-
u16::MAX / 2
163+
u16::MAX / 10
164164
));
165165

166166
let staker_coldkey = U256::from(7);
@@ -324,11 +324,11 @@ fn test_senate_leave_works() {
324324
coldkey_account_id
325325
);
326326

327-
// Lets make this new key a delegate with a 50% take.
327+
// Lets make this new key a delegate with a 10% take.
328328
assert_ok!(SubtensorModule::do_become_delegate(
329329
<<Test as Config>::RuntimeOrigin>::signed(coldkey_account_id),
330330
hotkey_account_id,
331-
u16::MAX / 2
331+
u16::MAX / 10
332332
));
333333

334334
let staker_coldkey = U256::from(7);
@@ -394,11 +394,11 @@ fn test_senate_leave_vote_removal() {
394394
coldkey_account_id
395395
);
396396

397-
// Lets make this new key a delegate with a 50% take.
397+
// Lets make this new key a delegate with a 10% take.
398398
assert_ok!(SubtensorModule::do_become_delegate(
399399
coldkey_origin.clone(),
400400
hotkey_account_id,
401-
u16::MAX / 2
401+
u16::MAX / 10
402402
));
403403

404404
let staker_coldkey = U256::from(7);
@@ -530,11 +530,11 @@ fn test_senate_not_leave_when_stake_removed() {
530530
coldkey_account_id
531531
);
532532

533-
// Lets make this new key a delegate with a 50% take.
533+
// Lets make this new key a delegate with a 10% take.
534534
assert_ok!(SubtensorModule::do_become_delegate(
535535
<<Test as Config>::RuntimeOrigin>::signed(coldkey_account_id),
536536
hotkey_account_id,
537-
u16::MAX / 2
537+
u16::MAX / 10
538538
));
539539

540540
let staker_coldkey = U256::from(7);

pallets/subtensor/tests/staking.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2717,21 +2717,21 @@ fn test_delegate_take_can_be_decreased() {
27172717
add_network(netuid, 0, 0);
27182718
register_ok_neuron(netuid, hotkey0, coldkey0, 124124);
27192719

2720-
// Coldkey / hotkey 0 become delegates with 5% take
2720+
// Coldkey / hotkey 0 become delegates with 10% take
27212721
assert_ok!(SubtensorModule::do_become_delegate(
27222722
<<Test as Config>::RuntimeOrigin>::signed(coldkey0),
27232723
hotkey0,
2724-
u16::MAX / 2
2724+
u16::MAX / 10
27252725
));
2726-
assert_eq!(SubtensorModule::get_hotkey_take(&hotkey0), u16::MAX / 2);
2726+
assert_eq!(SubtensorModule::get_hotkey_take(&hotkey0), u16::MAX / 10);
27272727

2728-
// Coldkey / hotkey 0 decreases take to 10%
2728+
// Coldkey / hotkey 0 decreases take to 5%
27292729
assert_ok!(SubtensorModule::do_decrease_take(
27302730
<<Test as Config>::RuntimeOrigin>::signed(coldkey0),
27312731
hotkey0,
2732-
u16::MAX / 10
2732+
u16::MAX / 20
27332733
));
2734-
assert_eq!(SubtensorModule::get_hotkey_take(&hotkey0), u16::MAX / 10);
2734+
assert_eq!(SubtensorModule::get_hotkey_take(&hotkey0), u16::MAX / 20);
27352735
});
27362736
}
27372737

0 commit comments

Comments
 (0)