-
Notifications
You must be signed in to change notification settings - Fork 725
[Refactor] Cleanup access to chainActive in a few places #1806
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
Conversation
Fuzzbawls
left a comment
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.
ACK d0739e496ae129b0a822538edd5b950ec0d93077
furszy
left a comment
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.
Code review ACK d0739e496ae129b0a822538edd5b950ec0d93077 .
Left few comments under the same code aspect.
d0739e4 to
6dcd48b
Compare
|
Updated, addressing @furszy's comments. |
furszy
left a comment
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.
cool, ACK 6dcd48bb09ceaeddd6b75d36d358512cb806a656
6dcd48b to
def064f
Compare
|
Rebased to fix a minor conflict with #1809 just merged. |
furszy
left a comment
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.
re-re-ACK def064f.
Refactor a few places in masternode/rpc code where
chainActive.Tip()orchainActive.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).