Skip to content

Commit

Permalink
move assert up
Browse files Browse the repository at this point in the history
  • Loading branch information
camfairchild committed Sep 11, 2024
1 parent 18fd05c commit 901cd62
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pallets/subtensor/tests/coinbase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,11 @@ fn test_coinbase_nominator_drainage_with_neutral_delta() {
);
log::debug!("Stakes added for nominators");

let nominator1_stake_before =
SubtensorModule::get_stake_for_coldkey_and_hotkey(&nominator1, &hotkey);
// Notice that nominator1 stake is the unchanged from the initial stake
assert_eq!(nominator1_stake_before, 100);

// 5. Set emission and verify initial states
SubtensorModule::set_emission_values(&[netuid], vec![10]).unwrap();
assert_eq!(SubtensorModule::get_subnet_emission_value(netuid), 10);
Expand Down Expand Up @@ -809,9 +814,6 @@ fn test_coinbase_nominator_drainage_with_neutral_delta() {
let nominator2_stake =
SubtensorModule::get_stake_for_coldkey_and_hotkey(&nominator2, &hotkey);

// Notice that nominator1 stake is the unchanged from the initial stake
assert_eq!(nominator1_stake, 100);

log::debug!(
"Final stakes - Hotkey: {}, Nominator1: {}, Nominator2: {}, Total Hotkey Stake: {}",
delegate_stake,
Expand Down

0 comments on commit 901cd62

Please sign in to comment.