File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -868,15 +868,24 @@ fn test_emission_based_on_registration_status() {
868868 . len( ) ,
869869 n as usize
870870 ) ;
871+
872+ // drain the emission tuples for the subnet with registration on
873+ SubtensorModule :: drain_emission ( next_block as u64 ) ;
871874 // Turn on registration for the subnet with registration off
872875 SubtensorModule :: set_network_registration_allowed ( netuid_off, true ) ;
876+ SubtensorModule :: set_network_registration_allowed ( netuid_on, false ) ;
873877
874878 // Generate emission at the next block
875879 let next_block: u64 = block + 1 ;
876880 SubtensorModule :: generate_emission ( next_block) ;
877881
878882 // Verify that emission tuples are now loaded for the subnet with registration turned on
879883 assert ! ( SubtensorModule :: get_loaded_emission_tuples( netuid_off) . is_some( ) ) ;
884+ log:: info!(
885+ "Emissions for netuid with registration on: {:?}" ,
886+ SubtensorModule :: get_loaded_emission_tuples( netuid_on)
887+ ) ;
888+ assert ! ( SubtensorModule :: get_loaded_emission_tuples( netuid_on) . is_none( ) ) ;
880889 assert_eq ! (
881890 SubtensorModule :: get_loaded_emission_tuples( netuid_off)
882891 . unwrap( )
You can’t perform that action at this time.
0 commit comments