Skip to content

Commit ddce4c8

Browse files
author
YZX0
committed
Fix: Issue #2291 - Resolve registration difficulty latching
1 parent be47139 commit ddce4c8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pallets/subtensor/src/coinbase/block_step.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,26 +137,26 @@ impl<T: Config + pallet_drand::Config> Pallet<T> {
137137
#[allow(clippy::comparison_chain)]
138138
if pow_registrations_this_interval > burn_registrations_this_interval {
139139
// C. There are not enough registrations this interval and most of them are pow registrations
140-
// this triggers a decrease in the burn cost
141-
// burn_cost --
142-
Self::set_burn(
140+
// this triggers a decrease in the pow difficulty
141+
// pow_difficulty --
142+
Self::set_difficulty(
143143
netuid,
144-
Self::upgraded_burn(
144+
Self::upgraded_difficulty(
145145
netuid,
146-
current_burn,
146+
current_difficulty,
147147
registrations_this_interval,
148148
target_registrations_this_interval,
149149
),
150150
);
151151
} else if pow_registrations_this_interval < burn_registrations_this_interval {
152152
// D. There are not enough registrations this interval and most of them are burn registrations
153-
// this triggers a decrease in the pow difficulty
154-
// pow_difficulty --
155-
Self::set_difficulty(
153+
// this triggers a decrease in the burn cost
154+
// burn_cost --
155+
Self::set_burn(
156156
netuid,
157-
Self::upgraded_difficulty(
157+
Self::upgraded_burn(
158158
netuid,
159-
current_difficulty,
159+
current_burn,
160160
registrations_this_interval,
161161
target_registrations_this_interval,
162162
),

0 commit comments

Comments
 (0)