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] Cleanup access to chainActive in a few places #1806

Merged
merged 2 commits into from
Aug 21, 2020

Conversation

random-zebra
Copy link

Refactor a few places in masternode/rpc code where chainActive.Tip() or chainActive.Height() is used.
Make use of the function GetChainTip(), moved from miner to main, which returns a more reliable pointer (from mapBlockIndex, instead of chainActive).
Remove redundant checks in masternode's GetBlockHash (e.g. see comments in #1791).

@random-zebra random-zebra added this to the 5.0.0 milestone Aug 13, 2020
@random-zebra random-zebra self-assigned this Aug 13, 2020
Fuzzbawls
Fuzzbawls previously approved these changes Aug 18, 2020
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK d0739e4

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

Code review ACK d0739e4 .
Left few comments under the same code aspect.

src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/rpc/blockchain.cpp Outdated Show resolved Hide resolved
@random-zebra
Copy link
Author

Updated, addressing @furszy's comments.

furszy
furszy previously approved these changes Aug 19, 2020
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

cool, ACK 6dcd48b

@random-zebra
Copy link
Author

Rebased to fix a minor conflict with #1809 just merged.

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

re-re-ACK def064f.

@random-zebra random-zebra merged commit b9f30f6 into PIVX-Project:master Aug 21, 2020
@random-zebra random-zebra modified the milestones: 5.0.0, 4.3.0 Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants