refactor: move CDeterministicMN class members above functions#5341
Merged
PastaPastaPasta merged 1 commit intodashpay:developfrom Apr 25, 2023
Merged
Conversation
knst
reviewed
Apr 20, 2023
| static constexpr uint16_t CURRENT_MN_FORMAT = 0; | ||
| static constexpr uint16_t MN_TYPE_FORMAT = 1; | ||
|
|
||
| uint256 proTxHash; |
Collaborator
There was a problem hiding this comment.
Why they are still public and not const?
I don't mind if move it above (it's fine), but touching them and still keeping them public and non-const... It doesn't look. Any code outside can easily change these data inside CDeterministicMN and make them inconsistent.
There was a problem hiding this comment.
@knst well no because we use CDeterministicMNCPtr (which is a std::shared_ptr<const CDeterministicMN>)
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.
Issue being fixed or feature implemented
I was trying to look at the members inside of CDeterministicMN and overlooked most of them initially since they're not at the top
What was done?
Moved the members up
How Has This Been Tested?
Compiling
Breaking Changes
None
Checklist:
Go over all the following points, and put an
xin all the boxes that apply.