@@ -122,20 +122,26 @@ impl<T: Config> Pallet<T> {
122
122
netuid,
123
123
subnet_proportion
124
124
) ;
125
- // 3.7: Calculate subnet's TAO emission: E_s = P_s * E_m
126
- let tao_in: u64 = mech_emission
127
- . checked_mul ( subnet_proportion)
128
- . unwrap_or ( I96F32 :: saturating_from_num ( 0 ) )
129
- . saturating_to_num :: < u64 > ( ) ;
130
- log:: debug!(
131
- "Subnet TAO emission (E_s) for netuid {:?}: {:?}" ,
132
- netuid,
133
- tao_in
134
- ) ;
135
- // 3.8: Store the subnet TAO emission.
136
- * tao_in_map. entry ( * netuid) . or_insert ( 0 ) = tao_in;
137
- // 3.9: Store the block emission for this subnet for chain storage.
138
- EmissionValues :: < T > :: insert ( * netuid, tao_in) ;
125
+
126
+ // Only emit TAO if the subnetwork allows registration.
127
+ if Self :: get_network_registration_allowed ( * netuid)
128
+ || Self :: get_network_pow_registration_allowed ( * netuid)
129
+ {
130
+ // 3.7: Calculate subnet's TAO emission: E_s = P_s * E_m
131
+ let tao_in: u64 = mech_emission
132
+ . checked_mul ( subnet_proportion)
133
+ . unwrap_or ( I96F32 :: saturating_from_num ( 0 ) )
134
+ . saturating_to_num :: < u64 > ( ) ;
135
+ log:: debug!(
136
+ "Subnet TAO emission (E_s) for netuid {:?}: {:?}" ,
137
+ netuid,
138
+ tao_in
139
+ ) ;
140
+ // 3.8: Store the subnet TAO emission.
141
+ * tao_in_map. entry ( * netuid) . or_insert ( 0 ) = tao_in;
142
+ // 3.9: Store the block emission for this subnet for chain storage.
143
+ EmissionValues :: < T > :: insert ( * netuid, tao_in) ;
144
+ }
139
145
}
140
146
141
147
// == We'll save the owner cuts for each subnet.
0 commit comments