-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[TRIVIAL] Reduce visibility of retired amendment identifiers: #3364
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3364 +/- ##
===========================================
- Coverage 70.41% 70.40% -0.02%
===========================================
Files 683 683
Lines 54775 54775
===========================================
- Hits 38570 38564 -6
- Misses 16205 16211 +6
Continue to review full report at Codecov.
|
@nbougalis, I think reducing the visibility of these amendment identifiers is a great idea. I've incorporated your suggested changes into the retiring amendments pull request: #3368. |
I am going to close this PR, since you've folded these changes in 3368. |
@scottschurr: considering that #3368 is closed for now, I'm going to reopen this to reduce the visibility of retired amendments. Would appreciate a review. |
Identifiers for retired amendments should not generally be used in the codebase. This commit reduces their visibility down to one translation unit and marks them as unused and deprecated to prevent accidental reuse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change. I have a couple of suggestions for you to consider including in this change. But I'll leave that to your discretion. 👍
// clang-format off | ||
|
||
uint256 const | ||
featureTickets = *getRegisteredFeature("Tickets"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a note, if getRegisteredFeature()
is called with a misspelled name it returns a null pointer which then crashes the app on startup. I had this happen to me while messing with features for retiring amendments. So I created different function that would create a good error message if the passed in name was not found.
Here's a commit you can cherry-pick if you'd like to pick up that change: scottschurr@9277217 That commit also includes some improved comments.
// pre-amendment code has been removed and the identifiers are deprecated. | ||
[[deprecated("The referenced amendment has been retired"), maybe_unused]] | ||
uint256 const | ||
retiredPayChan = *getRegisteredFeature("PayChan"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list is incomplete because when I first started unconditionalizing amendments I completely removed their registered features. I have a commit you could cherry-pick (the same one I mention elsewhere) which fills in the retired amendments that are missing from this list: scottschurr@9277217
Identifiers for retired amendments should not generally be used in the codebase.
This commit reduces their visibility down to one translation unit and marks them as unused and deprecated to prevent accidental reuse.