From 901cd6260383742c4ca890da0801c9c3cd8fffe2 Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Wed, 11 Sep 2024 18:29:30 -0400 Subject: [PATCH] move assert up --- pallets/subtensor/tests/coinbase.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pallets/subtensor/tests/coinbase.rs b/pallets/subtensor/tests/coinbase.rs index 176b65e10..1195482ed 100644 --- a/pallets/subtensor/tests/coinbase.rs +++ b/pallets/subtensor/tests/coinbase.rs @@ -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); @@ -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,