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 DecreaseScores method to be inside CDeterministicMNList class #5615

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

PastaPastaPasta
Copy link
Member

@PastaPastaPasta PastaPastaPasta commented Oct 16, 2023

Issue being fixed or feature implemented

It makes more sense for DecreaseScores to be inside of the MNList itself imo

What was done?

Refactored as such

How Has This Been Tested?

Reindexed

I had originally expected some performance improvements due to the removal of GetMN but in my benchmarking I didn't see any noticeable perf changes. I do still think the removal of GetMN and using a shared_ptr the whole time is better as it removes the chance of the master node disappearing from the list (which would have previously thrown, but is now impossible).

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 Oct 16, 2023
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.

makes sense, a couple tiny suggestions

src/evo/deterministicmns.cpp Outdated Show resolved Hide resolved
src/evo/deterministicmns.h Outdated Show resolved Hide resolved
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.

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.

👍

ACK

@UdjinM6 UdjinM6 merged commit 1c6f643 into dashpay:develop Oct 18, 2023
6 of 7 checks passed
@PastaPastaPasta PastaPastaPasta deleted the refac-DecreaseScores branch October 18, 2023 14:13
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.

3 participants