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

Remove dead code in pallet-subtensor #1036

Merged
merged 5 commits into from
Dec 4, 2024

Conversation

ales-otf
Copy link
Contributor

@ales-otf ales-otf commented Nov 28, 2024

Description

Removes dead methods and types listed below.

Methods:

  • get_normalized_stake
  • get_number_of_subnets
  • get_total_hotkey_delegated_stake
  • get_validator_prune_len
  • has_axon_info
  • has_prometheus_info
  • is_registration_allowed Remove dead code in pallet-subtensor #1036 (comment)
  • passes_rate_limit_globally
  • set_balance_on_coldkey_account
  • set_last_tx_block_childkey_take

Error variants:

  • NewColdKeyIsSameWithOld
  • ColdKeySwapTxRateLimitExceeded
  • NotExistColdkey
  • NoBalanceToTransfer
  • SameColdkey
  • DuplicateColdkey
  • ColdkeySwapError
  • InsufficientBalanceToPerformColdkeySwap
  • MaxColdkeyDestinationsReached
  • SwapColdkeyOnlyCallableByRoot
  • NewColdkeyIsInArbitration

Related Issue(s)

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):

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

@ales-otf ales-otf self-assigned this Nov 28, 2024
@ales-otf ales-otf force-pushed the chore/cleanup-pallet-subtensor branch 4 times, most recently from 7165d13 to 3fa8526 Compare November 28, 2024 19:10
pallets/subtensor/src/coinbase/root.rs Show resolved Hide resolved
pallets/subtensor/src/epoch/math.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/macros/errors.rs Show resolved Hide resolved
pallets/subtensor/src/tests/epoch.rs Show resolved Hide resolved
@ales-otf ales-otf force-pushed the chore/cleanup-pallet-subtensor branch 2 times, most recently from 72e4b73 to 1480eba Compare November 29, 2024 15:22
@ales-otf ales-otf marked this pull request as ready for review November 29, 2024 15:40
@ales-otf ales-otf requested a review from unconst as a code owner November 29, 2024 15:40
gztensor
gztensor previously approved these changes Nov 29, 2024
@ales-otf ales-otf force-pushed the chore/cleanup-pallet-subtensor branch 2 times, most recently from 69cc4ce to beec04f Compare December 3, 2024 14:48
@ales-otf ales-otf force-pushed the chore/cleanup-pallet-subtensor branch from 1fc94ea to 6bb1afe Compare December 4, 2024 21:45
@ales-otf ales-otf added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Dec 4, 2024
@sam0x17 sam0x17 merged commit 7f5bd9d into devnet-ready Dec 4, 2024
19 of 20 checks passed
@ales-otf ales-otf deleted the chore/cleanup-pallet-subtensor branch December 4, 2024 22:23
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.

6 participants