Skip to content

Conversation

mvds00
Copy link

@mvds00 mvds00 commented Aug 26, 2025

Description

Various minor tweaks to improve readability and performance of code. Fixes an issue where BlockEmission would be repeatedly set with wrong values.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe): cleanup

Checklist

  • I have performed a self-review of my own code
  • [-] I have commented my code, particularly in hard-to-understand areas
  • I have run cargo fmt and cargo clippy to ensure my code is formatted and linted correctly
  • [-] I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • [-] I have added tests that prove my fix is effective or that my feature works
  • [-] New and existing unit tests pass locally with my changes
  • [-] Any dependent changes have been merged and published in downstream modules

Additional Notes

This is the first of a possible sequence of small PRs to refactor some subtensor code. This was discussed at OpenDev and in the new #refactor-run_coinbase discord channel.

@mvds00 mvds00 changed the base branch from main to devnet-ready August 27, 2025 05:47
Copy link
Contributor

@gztensor gztensor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about moving this code to the different function:

        if BlockEmission::<T>::get() != block_emission_u64 {
            BlockEmission::<T>::put(block_emission_u64);
        }

Otherwise looks good.

@mvds00 mvds00 force-pushed the feat/mvds00-run-coinbase-refactoring branch from 1371ae3 to 24a1334 Compare August 27, 2025 18:00
@mvds00 mvds00 requested a review from gztensor August 27, 2025 18:18
gztensor
gztensor previously approved these changes Aug 28, 2025
@gztensor gztensor added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Aug 28, 2025
@sam0x17 sam0x17 merged commit b2a995b into opentensor:devnet-ready Aug 28, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-cargo-audit This PR fails cargo audit but needs to be merged anyway
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants