File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -110,13 +110,17 @@ impl<T: Config> Pallet<T> {
110
110
// --- 1. Iterate across each network and add pending emission into stash.
111
111
for ( netuid, tempo) in <Tempo < T > as IterableStorageMap < u16 , u16 > >:: iter ( ) {
112
112
// Skip the root network or subnets with registrations turned off
113
- if netuid == Self :: get_root_netuid ( ) || ! Self :: is_registration_allowed ( netuid ) {
113
+ if netuid == Self :: get_root_netuid ( ) {
114
114
// Root emission or subnet emission is burned
115
115
continue ;
116
116
}
117
117
118
118
// --- 2. Queue the emission due to this network.
119
- let new_queued_emission: u64 = Self :: get_subnet_emission_value ( netuid) ;
119
+ let mut new_queued_emission: u64 = Self :: get_subnet_emission_value ( netuid) ;
120
+ if !Self :: is_registration_allowed ( netuid) {
121
+ new_queued_emission = 0 ; // No emission for this network if registration is off.
122
+ }
123
+
120
124
log:: debug!(
121
125
"generate_emission for netuid: {:?} with tempo: {:?} and emission: {:?}" ,
122
126
netuid,
You can’t perform that action at this time.
0 commit comments