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

refactor: move CDeterministicMN class members above functions #5341

Merged

Conversation

PastaPastaPasta
Copy link
Member

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 x in all the boxes that apply.

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@PastaPastaPasta PastaPastaPasta added this to the 20 milestone Apr 19, 2023
@@ -46,6 +46,12 @@ class CDeterministicMN
static constexpr uint16_t CURRENT_MN_FORMAT = 0;
static constexpr uint16_t MN_TYPE_FORMAT = 1;

uint256 proTxHash;
Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@knst well no because we use CDeterministicMNCPtr (which is a std::shared_ptr<const CDeterministicMN>)

Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

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

Sure why not. utACK

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@PastaPastaPasta PastaPastaPasta merged commit b22cfbd into dashpay:develop Apr 25, 2023
@PastaPastaPasta PastaPastaPasta deleted the refac-minor-loc-members branch April 25, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants