diff --git a/pallets/subtensor/tests/block_step.rs b/pallets/subtensor/tests/block_step.rs index 4d1c16acb..eb97fe692 100644 --- a/pallets/subtensor/tests/block_step.rs +++ b/pallets/subtensor/tests/block_step.rs @@ -868,8 +868,12 @@ fn test_emission_based_on_registration_status() { .len(), n as usize ); + + // drain the emission tuples for the subnet with registration on + SubtensorModule::drain_emission(next_block as u64); // Turn on registration for the subnet with registration off SubtensorModule::set_network_registration_allowed(netuid_off, true); + SubtensorModule::set_network_registration_allowed(netuid_on, false); // Generate emission at the next block let next_block: u64 = block + 1; @@ -877,6 +881,11 @@ fn test_emission_based_on_registration_status() { // Verify that emission tuples are now loaded for the subnet with registration turned on assert!(SubtensorModule::get_loaded_emission_tuples(netuid_off).is_some()); + log::info!( + "Emissions for netuid with registration on: {:?}", + SubtensorModule::get_loaded_emission_tuples(netuid_on) + ); + assert!(SubtensorModule::get_loaded_emission_tuples(netuid_on).is_none()); assert_eq!( SubtensorModule::get_loaded_emission_tuples(netuid_off) .unwrap()