refactor: inline single-use _get_child_storage_key method - #849
Closed
ebios-star wants to merge 1 commit into
Closed
refactor: inline single-use _get_child_storage_key method#849ebios-star wants to merge 1 commit into
ebios-star wants to merge 1 commit into
Conversation
_get_child_storage_key on IssueCompetitionContractClient was a 7-line private method called from exactly one place: read_issue_from_child_storage. Same single-use-helper pattern as the merged entrius#748, entrius#801, and entrius#802 work. The inlined try/except is preserved verbatim and kept distinct from the existing decode-side try/except in the caller, so the per-stage debug log messages ("Error getting child storage key" vs "Error reading issue {id}") stay attributable. `grep -rn _get_child_storage_key` confirms no other call sites in gittensor/, neurons/, or tests/. -9/+5 lines, full test suite passes.
Contributor
Author
|
@anderdc @LandynDev — friendly ping for review when you have a moment. Same family as #748 / #801 / #802 (all merged) — single-use private method inlined into its only caller. Happy to rebase if needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`_get_child_storage_key` on `IssueCompetitionContractClient` (gittensor/validator/issue_competitions/contract_client.py:127-133) was a 7-line private method called from exactly one place: `read_issue_from_child_storage`. Same single-use-helper pattern as the merged #748, #801, and #802.
The inlined try/except is preserved verbatim and kept distinct from the existing decode-side try/except in the caller, so the per-stage debug log messages ("Error getting child storage key" vs "Error reading issue {id}") stay attributable to the right phase.
`grep -rn _get_child_storage_key` confirms no other call sites in `gittensor/`, `neurons/`, or `tests/`.
Net: -9 / +5 lines, one fewer private method on the contract client. No behavior change.
Related Issues
N/A — same family of cleanups as #641 / #748 / #801 / #802.
Type of Change
Testing
Checklist