Skip to content

Commit 2aba3eb

Browse files
committed
fix: skip emission but run epoch
1 parent fdddc09 commit 2aba3eb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pallets/subtensor/src/block_step.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,17 @@ impl<T: Config> Pallet<T> {
110110
// --- 1. Iterate across each network and add pending emission into stash.
111111
for (netuid, tempo) in <Tempo<T> as IterableStorageMap<u16, u16>>::iter() {
112112
// 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() {
114114
// Root emission or subnet emission is burned
115115
continue;
116116
}
117117

118118
// --- 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+
120124
log::debug!(
121125
"generate_emission for netuid: {:?} with tempo: {:?} and emission: {:?}",
122126
netuid,

0 commit comments

Comments
 (0)