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

blockchain: Add median time to state snapshot. #753

Merged
merged 2 commits into from
Jul 20, 2017

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jul 20, 2017

Upstream commit c57c18c.


This adds a new field to the best chain state snapshot for the calculated past median time as returned by the calcPastMedianTime function. This is useful since it provides fast access to it without having to acquire the chain lock which is needed to recalculate it.

This will ultimately allow the associated exported function to be removed since it only exists to be able to calculate this exact value, however this commit only introduces the new field in order to keep the changes minimal.

This adds a new field to the best chain state snapshot for the
calculated past median time as returned by the calcPastMedianTime
function.  This is useful since it provides fast access to it without
having to acquire the chain lock which is needed to recalculate it.

This will ultimately allow the associated exported function to be
removed since it only exists to be able to calculate this exact value,
however this commit only introduces the new field in order to keep the
changes minimal.
Copy link
Member

@dajohi dajohi left a comment

Choose a reason for hiding this comment

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

ok

@davecgh davecgh force-pushed the merge_blockchain_beststate_mediantime branch from e1c39a4 to 1e9d718 Compare July 20, 2017 14:55
@davecgh davecgh merged commit 1e9d718 into decred:master Jul 20, 2017
@davecgh davecgh deleted the merge_blockchain_beststate_mediantime branch July 20, 2017 15:12
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.

2 participants