Skip to content

Commit

Permalink
Fix test_non_existent_account
Browse files Browse the repository at this point in the history
  • Loading branch information
gztensor committed Jan 8, 2025
1 parent 8f02483 commit 6e748e1
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions pallets/subtensor/src/tests/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -962,21 +962,22 @@ fn test_has_enough_stake_no_for_zero() {
#[test]
fn test_non_existent_account() {
new_test_ext(1).execute_with(|| {
assert!(false);

// SubtensorModule::increase_stake_on_coldkey_hotkey_account(
// &U256::from(0),
// &(U256::from(0)),
// 10,
// );
// assert_eq!(
// SubtensorModule::get_stake_for_coldkey_and_hotkey(&U256::from(0), &U256::from(0)),
// 10
// );
// assert_eq!(
// SubtensorModule::get_total_stake_for_coldkey(&(U256::from(0))),
// 10
// );
let netuid = 1;
SubtensorModule::increase_stake_for_hotkey_and_coldkey_on_subnet(
&U256::from(0),
&(U256::from(0)),
netuid,
10,
);
assert_eq!(
SubtensorModule::get_stake_for_hotkey_and_coldkey_on_subnet(&U256::from(0), &U256::from(0), netuid),
10
);
// No subnets => no iteration => zero total stake
assert_eq!(
SubtensorModule::get_total_stake_for_hotkey(&(U256::from(0))),
0
);
});
}

Expand Down

0 comments on commit 6e748e1

Please sign in to comment.