-
Notifications
You must be signed in to change notification settings - Fork 714
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
[Refactor] Cleanup access to chainActive in a few places #1806
Conversation
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 d0739e4
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 d0739e4 .
Left few comments under the same code aspect.
d0739e4
to
6dcd48b
Compare
Updated, addressing @furszy's comments. |
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 6dcd48b
6dcd48b
to
def064f
Compare
Rebased to fix a minor conflict with #1809 just merged. |
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).