Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix: dont payout if reg disabled #1024

Merged
merged 11 commits into from
Nov 27, 2024
4 changes: 2 additions & 2 deletions pallets/subtensor/src/coinbase/run_coinbase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl<T: Config> Pallet<T> {
// --- 3. Drain the subnet block emission and accumulate it as subnet emission, which increases until the tempo is reached in #4.
// subnet_blockwise_emission -> subnet_pending_emission
for netuid in subnets.clone().iter() {
if *netuid == 0 {
if *netuid == 0 && !Self::is_registration_allowed(*netuid) {
distributedstatemachine marked this conversation as resolved.
Show resolved Hide resolved
continue;
}
// --- 3.1 Get the network's block-wise emission amount.
Expand Down Expand Up @@ -90,7 +90,7 @@ impl<T: Config> Pallet<T> {
Self::set_blocks_since_last_step(*netuid, 0);
Self::set_last_mechanism_step_block(*netuid, current_block);

if *netuid == 0 {
if *netuid == 0 && !Self::is_registration_allowed(*netuid) {
distributedstatemachine marked this conversation as resolved.
Show resolved Hide resolved
// Skip netuid 0 payouts
continue;
}
Expand Down
101,708 changes: 50,854 additions & 50,854 deletions plain_spec_finney.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plain_spec_testfinney.json

Large diffs are not rendered by default.